Launching units into the air

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
 

227Minutes

New Member
Reaction score
1

But with impale you cant adjust the height, can you?

And how would you get it to work without the spike effect? If i remove the Impale (Effect) effect, the affected units just dissapear for a while, instead of flying up and down.
 

Sim

Forum Administrator
Staff member
Reaction score
534
Well, in the trigger editor you can change a unit's current flying height, which will cause it to go up in the air.

With the event Time - Every 0.05 seconds of game-time or so you should be able to have something smooth.
 

NeuroToxin

New Member
Reaction score
46
Note, with Daxtremes method, you have to add crow form, then remove it, then change the height
 

Sajin

User title under construction.
Reaction score
56
INTEL
events
map intel

conditions
none

actions
set Max_Height_Launch = 10

------

CAST
events
unit starts the effect of an ability

conditions
ability = launch

actions
set Launch_unit = target of ability being cast
add crow form to Launch_Unit
turn on rise

------

RISE
events
every 0.05 seconds

conditions
none

actions
if -
Launch_Unit_Height less then Max_Height_Launch
then -
Set Launch_Unit_Height = Launch_Unit current flying height + 1 //ground units have a default fly-height of 0
else -
turn off this trigger
turn on Fall

------

FALL
events
every 0.05 seconds

conditions
none

actions
if -
Launch_Unit_Height greater then 0
then -
Set Launch_Unit_Height = Launch_Unit current flying height - 1
else -
if -
Launch_Unit_height = 0
then-
Turn off this trigger
Remove Crow Form from Launch_Unit




thats basicly it well thats how I do it(in essence anyhow, this trigger leaks ;) )
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Just use hashtables, I think it's more MUI and you can do it in 2 triggers.
 

227Minutes

New Member
Reaction score
1
Just use hashtables, I think it's more MUI and you can do it in 2 triggers.

Care to elaborate? :p


And Sajin

How do I do it using your method? For rising, do I set the current flying height to that height variable, then set the variable to variable+1 (or +however much I need)? Cause the way you wrote it out, you dont really change the unit flying height lol:

Set Launch_Unit_Height = Launch_Unit current flying height + 1 //ground units have a default fly-height of 0

Doesn't that only change the variable, not the unit height?
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
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
 

227Minutes

New Member
Reaction score
1
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

Thanks dude. I didnt do it quite like you did, I used two triggers for the up/down instead, cause for some reason it was messing up for me lol, but still i pretty much used most of your method. :)
 

NeuroToxin

New Member
Reaction score
46
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.
 

227Minutes

New Member
Reaction score
1
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.

That doesn't allow for gravitational acceleration.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Yes it would.. You just have to adjust the rate, but the wait there... Wouldn't cause a problem?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top