Posts: 293
Threads: 35
Joined: Jan 2010
Reputation:
0
20 timers that checks if the player is in range of one point each, or 1 timer that checks if the player is in range of one of 20 points?
I'm making a script where the player will gradually loose HP in some areas, and I need to know what method to use.
Posts: 77
Threads: 3
Joined: Jan 2008
Reputation:
0
One timer. Why have nineteen more player loops and timers ticking away than you need?
Posts: 380
Threads: 11
Joined: Feb 2010
Reputation:
0
This is a good point, I didn't think of that.
Posts: 4,878
Threads: 85
Joined: Jun 2007
Reputation:
0
A point FOR multiple timers: If you have only one timer, you will have to loop through all players, checking if they are connected. But if you create a timer per player on connection you wont have to check if he is connected every time.
But i think one timer is still faster. If you use foreach it is for sure.