New to the forums, new to HPL, and new to scripting language (C++?).
. . . I know, so grating on your ears, right?
I'm great at picking things up and have been teaching myself as I go. I'm actually quite surprised at how far I've come without having to come on the forums.
But, alas, something has kicked my butt.
In my game, the player goes into the attic and is greeted by 5 levers and a locked chest. Using other information obtained, they must pull the levers in a certain order to unlock the chest. The order is 3 - 5 - 1 - 3. 4 is not touched.
For the life of me I can't figure out how to make this happen.
I was able to find a Thread in which the player had to light candles in a certain order, but unfortunately the code base is too different to transfer over simply enough, or at least I'm too out of it to figure it out.
AddDebugMessage is your friend here. Use it to check if the combototal count works and if it does, check the comboright variable. It's quite an advanced thing to script, there aren't many here that could do this, myself included
(12-14-2010, 05:46 PM)Frontcannon Wrote: AddDebugMessage is your friend here. Use it to check if the combototal count works and if it does, check the comboright variable. It's quite an advanced thing to script, there aren't many here that could do this, myself included
Don't mean to be the complete new guy, but -- How exactly does the AddDebugMessage work?
I tried sticking it in OnStart as:
AddDebugMessage("combolever", true);
which I assumed would make the debug message come up for the syntax "Combolever", but no such luck.
Always set the boolean to false, I've never used it any other way.
Also make sure you have 'Display Debug Messages' (or the like) checked in your debug menu!
OH.
You're using it completely wrong so far D:
Let's have a look in my scripts somewhere.. here you go:
AddDebugMessage triggers when the normal function is called and then displays a little message (the string) in the bottom left of the screen. You use it to check if a CollideArea works (little message pops up -> yes, works, the error has to be in somewhere else! OR no message -> hm, area doesn't trigger) or a little more complicated in my case if you're looking at something (else) or not (the if case).