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
[Solved]Help i don't know how to use Timers
Viperdream Offline
Member

Posts: 124
Threads: 16
Joined: Jan 2011
Reputation: 0
#2
RE: Help i don't know how to use Timers

Example:

I want a timer that activates when I enter the map

This is what I do:

void MonsterSpawnTimer(string &in asTimer)
//No need to put anything between the "()", put stuff between {} to let stuff happen
{
SetEntityActive("bigassmonster", true);
}
And then, because I want it from the start, I do this:
void OnStart()
{
AddTimer("Monster", 10.0f, "MonsterSpawnTimer");  
}
//The "Monster" is just a name, you can name it anything you want
//The "10.0f" means 10seconds. Float stands for float.
//"MonsterSpawnTimer" is the Timer I'm referring to.

If you still don't understand it, check this out:
http://wiki.frictionalgames.com/hpl2/tut...t_beginner

(This post was last modified: 03-16-2011, 11:15 PM by Viperdream.)
03-16-2011, 11:14 PM
Find


Messages In This Thread
RE: Help i don't know how to use Timers - by Viperdream - 03-16-2011, 11:14 PM



Users browsing this thread: 1 Guest(s)