I'm firing a catapult in the general direction of a hero, though it actually hits somewhere within a small radius. This means there's no guarantee that there is a unit where it hits. Wherever it actually hits, I want any unit on that tile to take 12 damage, and any unit on an adjacent TILE to take 6. The second harm_unit in the following doesn't seem to work when $hit_locs[$i].x,$hit_locs[$i].y does not contain a unit.
I'm wondering what [filter_adjacent] means. I now think it means "adjacent to the unit at...", while I was originally hoping it meant "adjacent to the tile at ...". If I'm correct, is there a simple solution, or do I just have to iterate over [store_location] x,y... radius=1 ?
I'm wondering what [filter_adjacent] means. I now think it means "adjacent to the unit at...", while I was originally hoping it meant "adjacent to the tile at ...". If I'm correct, is there a simple solution, or do I just have to iterate over [store_location] x,y... radius=1 ?
Code:
[harm_unit] [filter] x,y=$hit_locs[$i].x,$hit_locs[$i].y [/filter] damage_type=impact amount=12 posioned=yes animate=yes [/harm_unit] [harm_unit] [filter] [filter_adjacent] x,y=$hit_locs[$i].x,$hit_locs[$i].y [/filter_adjacent] [/filter] damage_type=impact amount=6 posioned=yes animate=yes [/harm_unit]
Statistics: Posted by white_haired_uncle — Today, 4:50 am