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
Different Level Door Question (scripting)
Dalroc Offline
Member

Posts: 57
Threads: 2
Joined: Mar 2011
Reputation: 0
#3
RE: Different Level Door Question (scripting)

(04-08-2011, 05:37 AM)MrBigzy Wrote: Yea, you'd have to use variables to say whether the door is locked or not. For example:
if(GetLocalVarInt("Door")==1) //Door is locked, plays locked sound, etc.
if(GetLocalVarInt("Door")==2) //Door is unlocked, when clicked on it uses ChangeMap

You'd make it so when you use the key on the door, it would do SetLocalVarInt("Door", 2).

So yea, something like that.
Or he could use bool GetSwingDoorLocked(string& asName);
if(GetSwingDoorLocked(asEntity) == true){
    //Door is locked, plays locked sound, etc.
}
if(GetSwingDoorLocked(asEntity) == false){
    //Door is unlocked, when clicked on it uses ChangeMap
}
04-08-2011, 11:19 PM
Find


Messages In This Thread
RE: Different Level Door Question (scripting) - by Dalroc - 04-08-2011, 11:19 PM



Users browsing this thread: 1 Guest(s)