In the end it actually turned out rather simple. All levers pull up the string "combolever" in which case it checks many, many things. I'm sure this is "sloppy" work, but it works. In fact, I think that last part (The else if(Get...) is completely unnecessary, but if it works -- don't fix it.
All in all it just checks each lever pull, and if you pull a lever anywhere outside of sequence, it resets the sequence. Once completed it removes all the player interact call backs from the levers. My guess is the player will discover multiple combinations of lever pulls throughout the adventure, and each one will create and remove the call back as necessary.
Feel free to leave any comments, or questions . . . but I'm still new, so mainly comments. Especially regarding how to clean up the code -- I could use some help with that.
(12-19-2010, 03:05 PM)LoneWolf Wrote: Are the levers the ones from the machien room? the one with 4 levers?
Also what do you name the levers as? combo_lever_1 - 4 ?
No, the levers used were "Lever_small01.ent". Really, in essence, you can use any entity so long as the player can interact with it. One "problem" I noticed is you don't even need to pull the levers, you just need to click on them and the trigger activates. Of course, this is minor, as most players will still pull the levers for effect.
As for the naming, yes. There are actually 5 levers in total, "lever_combo_1" - "lever_combo_5". You can name the entities anything you want so long as you change the if((asEntity == "lever_combo_x") to the name of the entity you want to use.