Full Version : DAMAGE range
xmlspawner >>Q&A >>DAMAGE range
<< Prev | Next >>
olsyke- 05-12-2006

CODE
STATIC,14089/DAMAGE,50,0,0,0,50,50,1,playeronly

why does this only inflict damage to a player near the spawner itself ? no matter how far the static is distanced form the spawner the Damage-Range stays relative to the spawner....
meaning you see those flame columns all around but only get the damage when you stand on or next to the spawner
any ideas how to change that ?
ArteGordon- 05-12-2006
the syntax for the DAMAGE keyword is
DAMAGE,damage,phys,fire,cold,pois,energy[,range][,playeronly]
where range is the distance from the spawner. So with
STATIC,14089/DAMAGE,50,0,0,0,50,50,1,playeronly
the range is 1, so only players within 1 tile of the spawner will be affected.
You can either change that to the same range over which you are spawning your statics in which case all players within that range will be damaged, or if you just want the damage to be applied to the triggering player, just set the range to zero.
from xmlspawner2.txt

QUOTE
- Added the DAMAGE,damage,phys,fire,cold,pois,energy[,range][,playeronly] keyword. This will apply the specified damage either to the triggering player or to all mobs within the range if it is specified. When the playeronly flag is added, then damage will be applied to inrange players only, and not mobs. The damage will be distributed across the different types based upon the arg values. So to deliver 50 damage to the triggering player with 100% of it phys type, use the spec "DAMAGE,50,100,0,0,0,0". To deliver 10 damage to all mobs within a range of 5 tiles with half of it poison and half energy use the line "DAMAGE,10,0,0,0,50,50,5". To deliver 10 damage to all players within a range of 5 tiles with half of it poison and half energy use the line "DAMAGE,10,0,0,0,50,50,5,playeronly".

Oberon- 05-13-2006
Hello Arte,
a have another question.
I want make a spawn that will get a damage to player when a player stand on the same field like spawner. But I want that spawner get a damage only once at the moment when a player comming to a field. The spawner could get a next damage only when a player arrive again.
I think, that I must triggering playercount in the range of spawner (proximityrange=0), but when i use this condition, spawner return an error.
I have this option:
Subgroub1: DAMAGE,80,0,0,0,50,50,0,playeronly
Subgroub2: IF/PLAYERCOUNT<1/GOTO/1
Can you give me advice please?
Thank you.
ArteGordon- 05-13-2006
I think that you are thinking of the PLAYERSINRANGE keyword

QUOTE
- added the PLAYERSINRANGE,range value keyword that gives you access to the number of players within the specified range (thanks to CEO for the idea). This could be used to control what got spawned based on nearby player number, rather than just trig/notrig. So you could do things like

Something like this should do what you want.
subgroup 1: DAMAGE,80,0,0,0,50,50,0,playeronly
subgroup 2: WAITUNTIL/PLAYERSINRANGE,10<1
subgroup 3: GOTO/1
It will wait at subgroup 2 until there are no players around. Then when a player arrives it will trigger and apply the damage and wait at subgroup 2 again until no one is around.