Hey everyone,
I've been working on a custom story for about a week now. Been really trying to learn scripting through following some tutorial videos and just looking at the original game's .lang and .hps files.
It helped me a lot and got me quite far.
I just can't seem to figure out how I can make my lantern 'disappear' for about 3-4 seconds.
All I could come up with was
void blabla
{
AddTimer("lanternoff", 3, "LanternTurnsOff");
}
void LanternTurnsOff (string &in asTimer)
{
SetLanternDisabled(true);
}
But all that this does is, start the timer after 3 seconds as soon as I have entered my collision area, and I can't seem to figure out how to make it turn back on automatically.
Thanks in advance.
*EDIT
Lol after some clear thinking I figured it out myself.
I changed it to:
void blabla
{
SetLanternDisabled(true);
AddTimer("lanternon", 4, "LanternGoesOn1");
}
void LanternGoesOn1 (string &in asTimer)
{
SetLanternDisabled(false);
}
Works like a charm now.
Hope other people can benefit from this.