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
Door Opening Scripting Question
NuggetBlubber Offline
Junior Member

Posts: 13
Threads: 7
Joined: Nov 2011
Reputation: 2
#1
Door Opening Scripting Question

Im working on a custom story in amnesia and im scripting my first big monster scare. Whats supposed to happen is that you walk up to this door and the door flys open and a monster comes running out of it. I already have the monster scripted to what I want it to do. What I need help with is how to get the door to swing open. I looked up tutorials, but couldnt find any on this. Heres the code I was trying to use.

SetMoveObjectState(string& asName, float afState);

I dont know what I was supposed to put on the string& asName part. So if you know how to do this could you please give me the scripting details on it cause I am very new to all of this thanks.

11-29-2011, 04:39 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Door Opening Scripting Question

You put the name of the entity there, but SetMoveObjectState isn't used for doors. You first need to disable auto close with the SetSwingDoorDisableAutoClose function, then use the AddPropForce function to open the door. If the door is locked, then you'll need to unlock it before calling those functions, with the SetSwingDoorLocked function.

Tutorials: From Noob to Pro
11-29-2011, 06:31 PM
Website Find
NuggetBlubber Offline
Junior Member

Posts: 13
Threads: 7
Joined: Nov 2011
Reputation: 2
#3
RE: Door Opening Scripting Question

(11-29-2011, 06:31 PM)Your Computer Wrote: You put the name of the entity there, but SetMoveObjectState isn't used for doors. You first need to disable auto close with the SetSwingDoorDisableAutoClose function, then use the AddPropForce function to open the door. If the door is locked, then you'll need to unlock it before calling those functions, with the SetSwingDoorLocked function.

ok thanks ill give it a try
11-29-2011, 07:38 PM
Find




Users browsing this thread: 1 Guest(s)