Full Version : How do I - access players in a certain region
xmlspawner >>Q&A >>How do I - access players in a certain region
<< Prev | Next >>
olsyke- 06-20-2006
hello again
simple question but i couldnt find the answer anywhere.
how do i access all players in a predefined Region or with help of coords ?
ArteGordon- 06-20-2006
do you mean access in a script or access in a spawner? And what do you want to do with those players? Do you just need the number of players in an area or do you need to do something with them?
olsyke- 06-20-2006
in a spawner -
i want to set props on all players in a certain location/area/region
ArteGordon- 06-20-2006
you can use the SETONNEARBY keyword to set properties on items or mobiles within the specified range of the spawner.
SETONNEARBY,range,name[,type][,searchcontainers]/prop/value/prop/value...
for example to change the hue of all players within 10 tiles
SETONNEARBY,10,,playermobile/hue/50
olsyke- 06-20-2006
well the problem is the region i want to access them in is quite big
i tried SETONTRIGMOB with a proximityrange of 300 but when i leave the screen it already stops working coz im out of the range of the spawner
would probably be the same with SETONNEARBY since my region is like 100x200 tiles or something
ArteGordon- 06-20-2006
proximity triggering is limited by the built-in server movement detection methods which only work up to about 26 tiles away.
SETONNEARBY doesnt have that restriction.
When I add the new custom region system you will be able to do those sorts of things more easily, but that wont be for a while. Have to go through the new region implementation first.
olsyke- 06-20-2006
simply great !
nothing left to say but big Thanks!