Flying

A

Aqua_Dragon

Guest
I Need To Know How To Make A Unit Fly Up And Down Using A Trigger.I Want All Of One Specific Type Of Unit. And I Can't Use Specifics Since The Hero Has To Be Created From A Building.



Units Change In Height


/\ /\
/ \ / \ Unit
/ \ / \ /
/ \ / \ /
/ \ / \ /
/ \/ \/
 

Sim

Forum Administrator
Staff member
Reaction score
534
Well add Fllying to the unit... Go into Object Editor in Movement Type Field and select Flying. Then set a Flying Height under (or above) it. It will go up and down in the air.
 
R

Raiyn

Guest
I think he wants it to go more up and down in the air than normal terrain/fly heights.. Do you want it to appear that way?
 

TPOX

New Member
Reaction score
10
if you could reexplain what you need help we could help you more. Sort of dont understand what your needing help with other than making a unit fly.
 

uberfoop

~=Admiral Stukov=~
Reaction score
177
well, first, since you want the hero to be specified, make a unit variable (for the purposes of this thread, ill call it boughtunit). Then make a trigger that detects when the hero is trained/purchased and for actions has 'set boughtunit = purchased unit (or whatever the units trigger classification would be). Then, to make it be able to move up into the air, give it the druid of the talon's bird form ability thing and use the trigger 'animation-set unit's flying height' to change the height. when yer finished with the moving up and down, you should probably have a trigger remove the bird form ability.
 
A

Aqua_Dragon

Guest
To Explain Again, I Want The Unit To Go Up And Down Repedatly. Over And OVer. Never Stopping. Can You Tell Me That?



Unit Path Over And Over Again

....../\............/\
...../..\........../..\
..../....\......../....\
.../......\....../......\
../........\..../........\
./..........\../ Unit
/............\/
 

Sim

Forum Administrator
Staff member
Reaction score
534
Give it "Movement - *something* : Flying in Object Editor.

Then in Trigger Editor do this :

Code:
Flying_Up(INITIALLY OFF)
   Events
      Time - Every 0.10 seconds of game-time
   Conditions 
       Whatever
   Actions
       Set Flying_Up = ((Flying_Up) +5)
       Animation - Change UNIT_VARIABLE flying height to (Flying_Up) at 200.00 <-- or whatever you need, just test it)
       If (All Conditions) are true then do (Then Actions) else do (Else Actions
          If - Conditions
             Flying_Up Equal to 180
          Then - Actions
             Trigger - Turn Off (This Trigger)
             Trigger - Turn On Flying_Down <gen>
             Set Flying_Down = 180
          Else - Actions
              Do Nothing

Code:
(INITIALLY OFF)
Flying_Down
   Events
      Time - Every 0.10 seconds of game-time
   Conditions 
      Whatever
   Actions
       Set Flying_Down = ((Flying_Down) - 5)
       Animation - Change UNIT_VARIABLE flying height to (Flying_Down) at 200.00 <-- or whatever you need, just test it)
       If (All Conditions) are true then do (Then Actions) else do (Else Actions
          If - Conditions
             Flying_Up Equal to 20
          Then - Actions
             Trigger - Turn Off (This Trigger)
             Trigger - Turn On Flying_Down <gen>
             Set Flying_Up = 0
          Else - Actions
              Do Nothing

UNIT_VARIABLE = set this to the Trained Unit when it will enter the game.

EDIT: I wrote it all with my own hands, no Trigger Editor involved :D
 
A

Aqua_Dragon

Guest
But How Do I Make It Do That Trigger With EVERY SINGLE One Of The Unit I Want To Change Height Over And Over Again??

...../\
..../..\Unit (Fiend)
.../....\..../
../......\../
./........\/
...../\
..../..\Unit (Fiend)
.../....\..../
../......\../
./........\/

...../\
..../..\Unit (Fiend)
.../....\..../
../......\../
./........\/
All Of Them, Not Just One. UNless You Have A Better And Easier Suggestion For My Arena Map?
 

Sim

Forum Administrator
Staff member
Reaction score
534
First: set it every time a unit of the flying go-up-and-down type enter the map.

Next : Give all the units flying up-and-down an ability that does nothing but give a buff named : Flyer
Next : Trigger Editor and replace the triggers with this.

Code:
Flying_Up(INITIALLY OFF)
   Events
      Time - Every 0.10 seconds of game-time
   Conditions 
       Whatever
   Actions
       Set Flying_Up = ((Flying_Up) +5)
       Unit Group - Pick every unit in (Units in (Entire map) matching (((Matching unit) has buff Flyer) Equal to True)) and do (Actions)
          Loop - Actions
              Animation - Change (Picked unit) flying height to (Flying_Up) at 200.00 <-- or whatever you need, just test it)
              If (All Conditions) are true then do (Then Actions) else do (Else Actions
                 If - Conditions
                     Flying_Up Equal to 180
                 Then - Actions
                     Trigger - Turn Off (This Trigger)
                     Trigger - Turn On Flying_Down <gen>
                     Set Flying_Down = 180
                  Else - Actions
                     Do Nothing

Code:
(INITIALLY OFF)Flying_Down
   Events
      Time - Every 0.10 seconds of game-time
   Conditions 
      Whatever
   Actions
       Set Flying_Down = ((Flying_Down) - 5)
       Unit Group - Pick every unit in (Units in (Entire map) matching (((Matching unit) has buff Flyer) Equal to True)) and do (Actions)
          Loop - Actions
              Animation - Change (Picked unit) flying height to (Flying_Down) at 200.00 <-- or whatever you need, just test it)
              If (All Conditions) are true then do (Then Actions) else do (Else Actions
                  If - Conditions
                       Flying_Up Equal to 20
                  Then - Actions
                       Trigger - Turn Off (This Trigger)
                       Trigger - Turn On Flying_Down <gen>
                       Set Flying_Up = 0
                   Else - Actions
                       Do Nothing

Also, give all your flying-up-and-down units a flying height (in object editor) of like 90.

Also, Add this trigger.
Code:
Flying_Time
   Events
      Unit - A unit enters (Entire Map)
   Conditions
      Or - Any Conditions are true
          (Unit-Type of (Entering unit)) Equal to YOUR_FLYING_UNIT
          (Unit-Type of (Entering unit)) Equal to ANOTHER_FLYING_ONE
          (Unit-Type of (Entering unit)) Equal to ANOTHER_FLYING_ONE
          Repeat for every unit-type needed...
   Actions
      Turn On Flying_Up <gen>
      Turn Off (This Trigger)

Also, I think you will be unable to put underlines in your trigger names - Just remove them.

Again, all written without Trigger Editor.
 
A

Aqua_Dragon

Guest
What Does (Flying Up) Mean In The 10th Sentence?

Animation - Change (Picked unit) flying height to (Flying_Up) at 200.00 <-- or whatever you need, just test it)
 

Sim

Forum Administrator
Staff member
Reaction score
534
An integer variable. You have to create it then set its value to 0 (Default)

then use it everywhere in the trigger where needed.

Same for Flying_Down.
 
A

Aqua_Dragon

Guest
:banghead: I Can't Find Out How To Get The Integer Variable Inside. How Do I?
 

Sim

Forum Administrator
Staff member
Reaction score
534
I don't understand what you mean. The Integer Variable inside ? Well if you mean that you don't know how to get Flying_Up in this sentece : Set (Picked unit) Height to (Flying_Up)

You just have to select when you click on what is following "height to" Variable, then select Flying_Up among them.

If you don't know how to create a variable, open trigger editor and search for a yellow X above trigger list. Name it Flying_Up and select Type : Integer.
 
A

Aqua_Dragon

Guest
What I Meant Was The Event. The Event In THe Tenth Sentence, How Do i Get The Variable Into The Event.
 

Sim

Forum Administrator
Staff member
Reaction score
534
Events
Unit - A unit enters (Entire Map)

this ?
 
A

Aqua_Dragon

Guest
Animation - Change (Picked unit) flying height to (Flying_Up) at 200.00
........................................................................^

That. How Do I GEt The "FLying Height To (Flying_Up) At 200". I Need To Know How To Place The Variable In That Place Because I'm Trying Your Trigger Idea
 

Sim

Forum Administrator
Staff member
Reaction score
534
Well I already explained it to you. Select the value after ''height to'' then you will see another small page. Select variables and choose Flying_Up.
 
A

Aqua_Dragon

Guest
It Says In The Variable Section "No Variable Of This Type Defined". Why Does It KEep Saying That? I Placed It As An Integer Variable. I Gave It Default0. Why Can't I Place It In?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top