I'm writing a script for a creature, when it's at 25% life, it does something to every player in the area. I'm stuck at looping through all players in just the area. Here is what I have so far. The logic looks right to me, the compiler thinks otherwise =) . Any suggestion on how to best effect only players in the area the creature is in are welcome!
object oArea;// Get the area of the script caller.oArea = GetArea(OBJECT_SELF);
object oPC = ExploreAreaForPlayer(oArea);while (GetIsObjectValid(oPC)){ ActionSpeakString("Only Players in area should see this.");}
Thanks!
Every player in area?
Débuté par
Buddywarrior
, juil. 17 2012 07:52
#1
Posté 17 juillet 2012 - 07:52
#2
Posté 17 juillet 2012 - 08:11
Something like this:
object oArea = GetArea (OBJECT_SELF);
object oPC = GetFirstPC();
while (GetIsObjectValid (oPC))
{
if (GetArea (oPC) == oArea)
{
// Do stuff.
}
oPC = GetNextPC();
}
#3
Posté 17 juillet 2012 - 10:43
Ahhh thank you kindly Bard!





Retour en haut







