After a long time, i've decided to return to amnesia scripting and give it a try again, just for fun.
So here i written a small class, which could be (or no? who cares.)
handy for creating simple puzzles, for example, like a puzzle in the machine room (with levers).
Of course, maybe my class is ugly or redundant somewhere.. so keep it in mind
HPL Source with example is here: http://pastebin.com/W3QhHr2d
And example map is here too: http://pastebin.com/BzKd6apq
So, all you need in order to use it is:
- Place the class somewhere in your .hpl script. (And may be amend it to your taste.)
- Write own function-callback which will be receiving a result (true/false).
- Pass to the constructor your data (Array with levers, array with correct lever positions, and func).
- Make a call from your ConnectionStateChangeCallBack to notifySwitch.
If you find it helpful - comments are welcome 8)