I have a trigger for reload that silences the unit when it is cast. But for some reason, it only silences when the game first starts before I move my unit. If I move my unit, it doesnt get silenced anymore. If I leave it at where it spawned, it will get silenced every time it reloads. Any ideas?
Here's the trigger:
Mana is current ammo, lumber is spare ammo, and the level of silence determines how long the unit is silenced based on the unit's agility up to 100 agility.
Here's the trigger:
Trigger:
- Reload
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Reload
- Actions
- Player - Set (Owner of (Casting unit)) Current lumber to (((Owner of (Triggering unit)) Current lumber) - (Integer(((Max mana of (Triggering unit)) - (Mana of (Triggering unit))))))
- Unit - Create 1 Universal Dummy for Player 12 (Brown) at (Position of (Triggering unit)) facing Default building facing degrees
- Unit - Add Reload Silence to (Last created unit)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Agility of (Casting unit) (Include bonuses)) Greater than 100
- Then - Actions
- Unit - Set level of Reload Silence for (Last created unit) to 100
- Else - Actions
- Unit - Set level of Reload Silence for (Last created unit) to (Agility of (Casting unit) (Include bonuses))
- If - Conditions
- Unit - Order (Last created unit) to Neutral Fire Lord - Soul Burn (Triggering unit)
- Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Owner of (Casting unit)) Current lumber) Greater than or equal to (Integer((Mana of (Casting unit))))
- Then - Actions
- Unit - Set mana of (Casting unit) to 100.00%
- Else - Actions
- Unit - Set mana of (Casting unit) to ((Mana of (Triggering unit)) + (Real(((Triggering player) Current lumber))))
- If - Conditions
- Events
Mana is current ammo, lumber is spare ammo, and the level of silence determines how long the unit is silenced based on the unit's agility up to 100 agility.