Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
what the script Doorslam but reverse
Linus Ågren Offline
Senior Member

Posts: 309
Threads: 58
Joined: Jan 2011
Reputation: 5
#8
RE: what the script Doorslam but reverse

Okay, first of all, you want to make the door "open" like someone pressed the handle down.
Use this code:
PHP Code: (Select All)
SetSwingDoorClosed("doorname"falsetrue); 
(Replace doorname with your own doors name.

Secondly, you want to make sure that the door does not close by itself instantly after the "handle is pulled". I think it like someone is holding the handle down. Use this code for that:
PHP Code: (Select All)
SetSwingDoorDisableAutoClose("doorname"true); 

Now you want to push the door open, but in order not to push it in the wrong direction, check in the level editor which axis you're supposed to use, and also if it's a negative or a positive value. (It's probably the X or Z axis unless the door is on the ceiling or floor)

Now apply the actual force to open the door:
PHP Code: (Select All)
AddPropImpulse("doorname"float afXfloat afYfloat afZ""); 
Replace the "float afX/Y/Z" with the amount of force you'd like, and make sure it's the correct axis.

Creator of The Dark Treasure.
12-27-2011, 03:53 PM
Website Find


Messages In This Thread
RE: what the script Doorslam but reverse - by Linus Ågren - 12-27-2011, 03:53 PM



Users browsing this thread: 1 Guest(s)