[Bug?] MonsterGroup & damageTile
Posted: Tue May 21, 2013 6:05 pm
Greetings to you all, for this is my first Post here.
I have been fiddling with a problem that is caused by "MonsterGroup" and "damageTile".
For my little mod I wish to create a trap that kills everything that steps on it. The trap is a bundle of spears that come out of a wall. Once outside they block the party and monsters until a reset. By now it works well with the party and single monsters. But when a MonsterGroup triggers it, only one Monster of the group dies and the others continue walking through it. I used damageTile to kill the monster or the party.
Why does damageTile only kill one monster?
Apparently there is only one monster in the cell when the group walks into it and triggers the trap. I got this when I tried checking for all the monsters in the cell. If I start looking for monsters in a radius of one cell around the trap (all 9 cells) I definitely find all that belong to that group, but I also get all other monsters as well.
How do I find only those that belong to a group altogether? Is there a way to do this by code?
One attempt was to spawn a timer to cause damage on the cell very rapidly with damageTile. It worked on killing the monsters but it crashed the animation of the trap (the spears are doors that open and close) and spawn of the blockage.
My current approach on this issue would be to create copies of the same Monster, name it differently, group it and never use the group on a level more than once. That way I could ":destroy()" them without any crashes. This is a workaround but a very ugly one. Is there a better way to do this?
Here you can see the arrangement of the trap.

I have been fiddling with a problem that is caused by "MonsterGroup" and "damageTile".
For my little mod I wish to create a trap that kills everything that steps on it. The trap is a bundle of spears that come out of a wall. Once outside they block the party and monsters until a reset. By now it works well with the party and single monsters. But when a MonsterGroup triggers it, only one Monster of the group dies and the others continue walking through it. I used damageTile to kill the monster or the party.
Why does damageTile only kill one monster?
Apparently there is only one monster in the cell when the group walks into it and triggers the trap. I got this when I tried checking for all the monsters in the cell. If I start looking for monsters in a radius of one cell around the trap (all 9 cells) I definitely find all that belong to that group, but I also get all other monsters as well.
How do I find only those that belong to a group altogether? Is there a way to do this by code?
One attempt was to spawn a timer to cause damage on the cell very rapidly with damageTile. It worked on killing the monsters but it crashed the animation of the trap (the spears are doors that open and close) and spawn of the blockage.
My current approach on this issue would be to create copies of the same Monster, name it differently, group it and never use the group on a level more than once. That way I could ":destroy()" them without any crashes. This is a workaround but a very ugly one. Is there a better way to do this?
Here you can see the arrangement of the trap.
