| 06-27-2006, 04:46 PM | #1 |
Is there anyway to trigger an event for "A unit is unloaded"? There is an event for when a unit is loaded. I am trying to find a way to give a catapult increased movement speed for each unit that is loaded in it and then take away that movement speed when units are unloaded. Anyone have any tips or fixes for this problem? Thanks. |
| 06-27-2006, 04:59 PM | #2 |
You can trigger on the unload order if you remove unload all. Otherwise, you need to use a timer or sleep loop to check. If you wanted to spend a lot of time, you could turn the load/unload stuff into an inventory and use item abilities. |
| 06-28-2006, 04:24 AM | #3 |
Well, I finally fixed it. I did the first suggestion by PipeDream with a bit of modification. I made two triggers: "SiegeUnMan" Events Unit - A unit Is issued an order with no target Unit - A unit Is issued an order targeting an object Unit - A unit Is issued an order targeting a point Conditions (Issued order) Equal to (Order(unload)) Actions Unit - Set mana of (Ordered unit) to ((Mana of (Ordered unit)) - 1.00) Unit - Set (Ordered unit) movement speed to (20.00 x (Mana of (Ordered unit))) "SiegeUnManAll" Events Unit - A unit Begins casting an ability Conditions (Ability being cast) Equal to Unload Instant (Entangled Mine) Actions Unit - Set mana of (Casting unit) to 0.00 Unit - Set (Casting unit) movement speed to (20.00 x (Mana of (Casting unit))) |
| 06-28-2006, 04:51 AM | #4 |
That is easy to abuse by canceling the unload. |
| 06-28-2006, 05:06 AM | #5 |
The unload is instant because it is the Entangled Gold mine ability. If you wanted to use an unload all that wasnt instant, I guess you could use: "Unit finishes casting an ability" |
| 06-28-2006, 05:26 AM | #6 |
*nod* Let us know if it works out. Edit: I think you misunderstood. Begins casting can be canceled before the effects occur. This is the source of the infamous empath mass item bug in Enfo's. Starts the effect should do the trick. |
| 06-28-2006, 12:31 PM | #7 |
But you can still unload units by clicking on their icon at the stat card. |
| 06-28-2006, 02:39 PM | #8 |
Which is what the "SiegeUnman" trigger does. That is a order when they are unloaded that way. |
| 06-28-2006, 02:56 PM | #9 |
You can detect this order? Never knew. |
| 06-28-2006, 03:06 PM | #10 |
Stat card is the normal "unload" order. |
