The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Timers/Lantern [Solved]
Zirg Offline
Junior Member

Posts: 14
Threads: 4
Joined: Feb 2011
Reputation: 0
#1
Timers/Lantern [Solved]

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.
(This post was last modified: 02-21-2011, 03:01 AM by Zirg.)
02-21-2011, 01:44 AM
Find


Messages In This Thread
Timers/Lantern [Solved] - by Zirg - 02-21-2011, 01:44 AM
RE: Timers/Lantern - by Tanshaydar - 02-21-2011, 02:52 AM
RE: Timers/Lantern [Solved] - by Zirg - 02-21-2011, 03:05 AM
RE: Timers/Lantern [Solved] - by Tanshaydar - 02-21-2011, 03:11 AM
RE: Timers/Lantern [Solved] - by Zirg - 02-21-2011, 03:35 AM
RE: Timers/Lantern [Solved] - by Tanshaydar - 02-21-2011, 04:43 AM



Users browsing this thread: 1 Guest(s)