Frictional Games Forum (read-only)

Full Version: Simple Puzzler (A Class for making puzzles)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Greetings Smile
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 Smile

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.
- Profit.

If you find it helpful - comments are welcome 8)