Thanks.
A conditional that checks if there are any players in the area
Débuté par
Grani
, août 09 2013 12:40
#1
Posté 09 août 2013 - 12:40
I wanted some variables to reset when a player leaves the area but only if there are no other players still in that area. Is there any function that can check whether the area is empty or not?
Thanks.
Thanks.
#2
Posté 09 août 2013 - 01:38
There's a bunch of ways to skin that cat. This is probably the best, given considerations of speed, reliability, and simplicity.
Funky
int GetIsAreaEmpty(object oArea) {
object oPC = GetFirstPC();
while (GetIsObjectValid(oPC)) {
if (GetArea(oPC) == oArea)
return FALSE;
oPC = GetNextPC();
}
return TRUE;
}
Funky
#3
Posté 09 août 2013 - 01:56
Great! Just what I needed! Thank you





Retour en haut






