| 05-17-2007, 02:59 AM | #1 |
It just occurred to me that there must be a problem with having trigger-managed pausing/unpausing of units and stun abilities in a map if any of those overlap. For example, if a unit is paused by a trigger for a duration and is meanwhile stunned by an ability and then the duration ends and the trigger unpauses the unit, they will be free to go even though the stun ability should still be in effect and they still have a swirly graphic over their head. Or, if there are just two overlapping triggers that pause-unpause a unit then it will only last until the first unpause, right? My understanding is that the game handles regular stun spells such that if you stun a stunned unit it will continue the stun until whichever one wears off last. How could that behaviour be incorperated into trigger based stuns as well? It seems to me like it would be nice to have a way to cancel the execution of triggers from other triggers while they are in the middle of a wait, I don't suppose there is a way to do that? |
| 05-17-2007, 03:36 AM | #2 |
Trigger stuns themselves. Have a 0.4 or so repeating timer that loops thogh a unit group containing every stunned unit on the map. Attatch a real to each of the units containing the duration they are stunned for. Round to the closest time step (as defined by the length your timer is repeating on), and unpause the unit when its over, remove the stunned SFX as well. Then its simply a matter of modifying the attatched value of a unit to increase its stun duration, or to attatch a value, pause it, and add it to the unit group to "stun" it. This may not be the optimal way to do it... or at all coherent... |
| 05-17-2007, 04:27 AM | #3 |
Stun a unit with a timer. Call some function, for our purposes call StunUnit(MyUnit, 4.0). Now they are stunned for some duration. Attach the timer by some means to the unit. Stun the unit again 2 seconds later with call StunUnit(MyUnit, 3.0). Now check the following... If the unit has a stun timer attached to it, get that timer and it's remaining time. If the remaining timer is greater than the duration argument in the call, keep the normal remaining time. Otherwise restart the timer for the called duration. Make sure timer is still attached. Rinse and repeat. |
| 05-17-2007, 06:45 AM | #4 |
That's all well and good for a simple set of hand-triggered stun abilities, but what about regular stuns like Bash, and War Stomp based abilities? Those won't mix with your solutions. Most (all?) stun abilities actually use the Stun buff don't they. If I converted all my triggered abilities to use a StunUnit function like Rising_Dusk suggests and then made sure in that function that units wouldn't unpause if they had a stun buff...that might solve things nicely. Then I have places scattered all over in my map where I issue orders to units and sometimes you need to pause, issue order, unpause. That would screw things up if the unit was stunned. So those would all need if statements so that if the unit was already stunned it would just issue the order...*groan* Anything other situations I'm forgetting? Perhaps I am asking for the impossible, or at least the not-so-simple, I just wonder how people have avoided or dealt with this problem in other complex maps. |
| 05-17-2007, 06:54 AM | #5 |
You will just have to deal with it. Other maps have no problem with this. Take for example, AotZ. If Chaplain Astelan were to FFG, let's say, Ginther, Ginther would be stunned. Then if Dahaka uses his ultimate, Ginther, along with other units, would be paused. It's not much of a problem in this case.. |
