Posts: 21
Threads: 10
Joined: Feb 2013
Reputation:
0
Hello, I was just wondering if anyone of you could explain if I should use SetTimer or SetTimerEx and why? I am making a death system and later on a level system but I want the method that gives the least lag.. And under which callback should I put it or should it exist in the timers callback?
Posts: 2,528
Threads: 124
Joined: Jul 2009
Reputation:
0
It depends on your situation. Usually you use timers to check something periodically, but you don't want to put it in OnPlayerUpdate, or to delay some action.
Posts: 21
Threads: 10
Joined: Feb 2013
Reputation:
0
Well my death system works like this: When the player dies the position is saved and a variable named pDeath is set to 1. Then OnPlayerSpawn the player will spawn on the death place if pDeath is 1. Then I want a timer to count down to 0 so that the player respawns. Should the timer be started when the player dies or should it always be going, checking if any players pDeath is 1?