f0rze Posted November 6, 2016 Share Posted November 6, 2016 Im making a map. And i want the doors to open when you come to a point on the map. I have a screenshot Quote Link to comment Share on other sites More sharing options...
macklebee Posted November 6, 2016 Share Posted November 6, 2016 http://www.leadwerks.com/werkspace/page/tutorials/_/doors-r24 1 Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
AggrorJorn Posted November 7, 2016 Share Posted November 7, 2016 I have a screenshot we don't. Quote Link to comment Share on other sites More sharing options...
f0rze Posted November 7, 2016 Author Share Posted November 7, 2016 http://www.leadwerks.com/werkspace/page/tutorials/_/doors-r24 They dont talk about creating a physics block and thats what a want to do. we don't. here you go https://gyazo.com/3f777021010bb71ff0a092adf2860ae4 Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted November 7, 2016 Share Posted November 7, 2016 Do you want to use the Flowgraph editor or just via code? Should the door close after you are no longer in the trigger? Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted November 7, 2016 Share Posted November 7, 2016 A very basic version where a door is opened as soon as anything hits the collision trigger: Script.door = nil --Entity "Door" function Script:Collision(entity,position,normal,speed) if self.door ~= nil then self.door.script:Open() end end And one, where the colliding entity needs to have the name 'player' for the trigger to work. Script.door = nil --Entity "Door" function Script:Collision(entity,position,normal,speed) if entity:GetKeyValue("name") == "player" then if self.door ~= nil then self.door.script:Open() end end end 2 Quote Link to comment Share on other sites More sharing options...
f0rze Posted November 8, 2016 Author Share Posted November 8, 2016 Thanks. So im trying to make a game where you have to chose your own way. there are two ways you can .To the left or the right. Once you chose a path then you cant go back. So the doors will close. Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted November 8, 2016 Share Posted November 8, 2016 Simplest solution: use the same script again on a trigger placed after player goes trough the opened door. But instead of calling the Open function, call the close function. Now the player has no means of opening the door again . Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.