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
Using a key to unlock a door on 2 separate levels.
Cyfiawn Offline
Junior Member

Posts: 27
Threads: 8
Joined: Jun 2012
Reputation: 0
#3
RE: Using a key to unlock a door on 2 separate levels.

(06-27-2012, 03:28 PM)FastHunteR Wrote: use a global variable, set it 0 at start, 1 once you unlocked it from the other side, and let the first side unlock when that global variable is 1. If you need more directions, like a sample script, just let me know.
Thanks for the reply,

I was thinking of that, but where can I put global variables, and how can I change it from the maps .hps file?
Map 1 hps = Mansion_WestWing.hps
Map 2 hps = Mansion_Courtyard.hps

I guess it would be something like:
void UnlockLCYDoor(string &in item, string &in door) {    

PlaySoundAtEntity("unlock_door", "unlock_door.snt", "level_hub_2", 0.0f, false);

SetLevelDoorLocked("level_hub_1", false);  
      
RemoveItem("Key_LowerCourtyard");
    
GlobalFile.GlobalVariable = true;

}


Some example code would be great. Smile

Thanks,
Cyfiawn
(This post was last modified: 06-27-2012, 03:40 PM by Cyfiawn.)
06-27-2012, 03:39 PM
Find


Messages In This Thread
RE: Using a key to unlock a door on 2 separate levels. - by Cyfiawn - 06-27-2012, 03:39 PM



Users browsing this thread: 1 Guest(s)