Hammerwatch Forum

Custom mapping and Mods => Editor Discussion => Topic started by: Voltec on August 20, 2013, 02:26:21 PM

Title: Arena Counter ?
Post by: Voltec on August 20, 2013, 02:26:21 PM
I´m trying to make an arena: u get ported inside, u beat up the evils and then be rewarded with a load of gold - but:
i can´t figure out how to make the exit open once there are no more monsters.
I did manage to make it work when there are only monsters placed in such a arena, but with monster spawners it just won´t work.
Closest i got was that the exit opened when all of the spawned monsters were dead, but the spawners themselves still stood there.
So, anyone got an idea how to make it all work out?
Title: Re: Arena Counter ?
Post by: Voltec on August 20, 2013, 05:39:15 PM
I found out now so to anyone else curious:
i made a variable and variable changers that add or subtract 1 each time an enemy leaves or enters, and then have a check variable for the starting value of the variable.
This checked that no monsters were left, so for the spawners i made an ObjectEventTrigger to see if all of them are destroyed, then put the 2 of them together in a counter and i was done.
thx to anyone who gave it some thought tho
Title: Re: Arena Counter ?
Post by: KptnKook on August 31, 2013, 11:44:42 PM
you can right click on spawners also, and then click "last spawned". so the scripts work on spawned mobs, which you did not place...