227Minutes
New Member
- Reaction score
- 1
Lets say I have a spell that launches nearby enemy units into the air
And stunning them temporarily? How do I do this? lol
Thanks
And stunning them temporarily? How do I do this? lol
Thanks
Impale.
Note, with Daxtremes method, you have to add crow form, then remove it, then change the height
Just use hashtables, I think it's more MUI and you can do it in 2 triggers.
Just use hashtables, I think it's more MUI and you can do it in 2 triggers.
Actually you dont need hashtables to make it MUI, you only need hashtables if you need to save damage/different heights for units. But this is another method.
Trigger:
- Casted
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Throw
- Actions
- Unit Group - Add (Target unit of ability being cast) to FlyingGroup
- Unit - Add Crow Form to (Target unit of ability being cast)
- Unit - Remove Crow Form from (Target unit of ability being cast)
- Set TempPoint = (Position of (Triggering unit))
- Unit - Create 1 Dummy for (Owner of (Triggering unit)) at TempPoint facing Default building facing degrees
- Unit - Add Dummy stun and damage to (Last created unit)
- Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
- Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
- Custom script: call RemoveLocation(udg_TempPoint)
Trigger:
- Change Height
- Events
- Time - Every 0.05 seconds of game time
- Conditions
- Actions
- Unit Group - Pick every unit in FlyingGroup and do (Actions)
- Loop - Actions
- Set CurrentHeight = (Current flying height of (Picked unit))
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- CurrentHeight Greater than or equal to MaxFlyHeight
- Then - Actions
- Unit Group - Remove (Picked unit) from FlyingGroup
- Unit Group - Add (Picked unit) to FlyingGroup2
- Else - Actions
- Animation - Change (Picked unit) flying height to (CurrentHeight + FlySpeed) at 0.00
- Unit Group - Pick every unit in FlyingGroup2 and do (Actions)
- Loop - Actions
- Set CurrentHeight = (Current flying height of (Picked unit))
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- CurrentHeight Less than or equal to 0.00
- Then - Actions
- Unit Group - Remove (Picked unit) from FlyingGroup2
- Else - Actions
- Animation - Change (Picked unit) flying height to (CurrentHeight - FlySpeed) at 0.00
Edit:
The second trigger should be this instead.
Trigger:
- Change Height
- Events
- Time - Every 0.05 seconds of game time
- Conditions
- Actions
- Unit Group - Pick every unit in FlyingGroup and do (Actions)
- Loop - Actions
- Set CurrentHeight = (Current flying height of (Picked unit))
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- CurrentHeight Greater than or equal to MaxFlyHeight
- Then - Actions
- Unit Group - Remove (Picked unit) from FlyingGroup
- Unit Group - Add (Picked unit) to FlyingGroup2
- Else - Actions
- Animation - Change (Picked unit) flying height to (CurrentHeight + FlySpeed) at 0.00
- Unit Group - Pick every unit in FlyingGroup2 and do (Actions)
- Loop - Actions
- Set CurrentHeight = (Current flying height of (Picked unit))
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- CurrentHeight Less than or equal to (Default flying height of (Picked unit) + 10.00)
- Then - Actions
- Animation - Change (Picked unit) flying height to (Default flying height of (Picked unit)) at 0.00
- Unit Group - Remove (Picked unit) from FlyingGroup2
- Else - Actions
- Animation - Change (Picked unit) flying height to (CurrentHeight - FlySpeed) at 0.00
And a setup trigger
Trigger:
- Setup
- Events
- Map initialization
- Conditions
- Actions
- Hashtable - Create a hashtable
- Set Hash = (Last created hashtable)
- Set FlySpeed = 50.00
- Set MaxFlyHeight = 400.00
Wait, couldn't you just do
Trigger:
- Lalala
- Events
- Unit - A Unit starts the effect of an ability
- Conditions
- (Ability being cast) equal to Launch
- Actions
- Custom Script: local unit u = GetTriggerUnit()
- Custom Script: set udg_Caster = u
- Unit - Add Crow Form to Caster
- Unit - Remove Crow Form from Caster
- Animation - Set Caster fly height to X over X seconds.
- Wait(X seconds)
- Animation - Set Caster fly height to 0 over X seconds.