I want to make an MUI air strike ability. The unit casts an area of effect indicator at a target location. It spawns a helicopter which drops a bomb. The bomb slowly descends and explodes once it reaches a low flying height. Here is my triggering so far:
I think everything works except for the flying height of the bomb. The messages report that the flying height changes from 300 to 25 instantly. It does not slowly descend. I read somewhere that the first value is what height you want the unit to be set to, and the "rate" is how many units it changes per second. The default height of the bomb is 300. If it changes at 55 units per second, it will hit 25 units in 5 seconds.
Why is the flying height of the unit changning from 300 to 25 within half a second?
-
Air Raid New
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Air Strike (New)
-
Actions
- Set TempPoint = (Target point of ability being cast)
- Set TempPoint2 = (TempPoint offset by (-800.00, -800.00))
- Unit - Create 1 Bomber for (Owner of (Casting unit)) at TempPoint facing Default building facing degrees
- Sound - Play AirStrikeLaunch <gen> at 90.00% volume, located at TempPoint with Z offset 0.00
- Unit - Order (Last created unit) to Move To TempPoint2
- Unit - Add a 6.00 second Generic expiration timer to (Last created unit)
- Unit - Create 1 Bomb for (Owner of (Casting unit)) at TempPoint facing Default building facing degrees
- Unit Group - Add (Last created unit) to AirRaidGroup
- Animation - Change (Last created unit) flying height to 25.00 at 55.00
- Game - Display to (All players) the text: (String((Current flying height of (Last created unit))))
- Trigger - Turn on Air Raid Bomb <gen>
- Custom script: call RemoveLocation (udg_TempPoint)
- Custom script: call RemoveLocation (udg_TempPoint2)
-
Events
-
Air Raid Bomb
-
Events
- Time - Every 0.50 seconds of game time
- Conditions
-
Actions
- Game - Display to (All players) the text: Trigger turned on
-
Unit Group - Pick every unit in AirRaidGroup and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Current flying height of (Picked unit)) Equal to 25.00
-
Then - Actions
- Game - Display to (All players) the text: (String((Current flying height of TempUnit)))
- Unit - Kill (Picked unit)
- Unit Group - Remove (Picked unit) from AirRaidGroup
- Set TempUnit = (Picked unit)
- Set TempPoint = (Position of (Picked unit))
- Set TempUnitGroup = (Units within 225.00 of TempPoint matching (((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True))
-
Unit Group - Pick every unit in TempUnitGroup and do (Actions)
-
Loop - Actions
- Unit - Cause TempUnit to damage (Picked unit), dealing 225.00 damage of attack type Spells and damage type Normal
-
Loop - Actions
- Custom script: call DestroyGroup (udg_TempUnitGroup)
- Custom script: call RemoveLocation (udg_TempPoint)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in AirRaidGroup) Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Game - Display to (All players) the text: Trigger turned off
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Events
Why is the flying height of the unit changning from 300 to 25 within half a second?
Last edited: