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
Removing a Timer
Greven Offline
Member

Posts: 106
Threads: 13
Joined: May 2011
Reputation: 3
#1
Removing a Timer

Hi there,

Ive been trying and trying but I cant get this to work.

I created a timer on OnEnter called GiantStep. And then in the GiantStep Func i added a timer that goes to GiantStep Func again (in other words a loop) Now I want this timer to be removed when the person picks up an item but the RemoveTimer doesnt work.
So here's my .hps
void OnEnter()
{
AddTimer("", 2, "GiantStep");
}

void GiantStep(string &in asTimer)
{
PlaySoundAtEntity("", "enemy_hallucination_disappear.snt", "hanging_lantern_ceiling_3", 0.0f, true);
AddPropImpulse("key_tomb_1", 0, 0, -2, "World");
AddTimer("", 4, "GiantStep");
StartScreenShake(0.05f, 0.3f,0.2f, 0.1f);
}

void Scream(string &in asEntity) // When the item is picked up
{
PlaySoundAtEntity("", "guardian_distant3.snt", "hanging_lantern_ceiling_3", 0.0f, true);
StartScreenShake(0.1f, 2.0f,0.2f, 1.5.0f);
AddTimer("", 0.1, "StopGiantStep");
}
void StopGiantStep(string &in asTimer)
{
RemoveTimer("GiantStep");
}

[WIP] Recidivus
06-02-2011, 07:41 PM
Find


Messages In This Thread
Removing a Timer - by Greven - 06-02-2011, 07:41 PM
RE: Removing a Timer - by Khyrpa - 06-02-2011, 08:08 PM
RE: Removing a Timer - by Hardarm - 06-02-2011, 08:09 PM
RE: Removing a Timer - by Greven - 06-02-2011, 08:42 PM
RE: Removing a Timer - by Kyle - 06-02-2011, 09:35 PM



Users browsing this thread: 1 Guest(s)