• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Flying Height

Status
Not open for further replies.
Level 17
Joined
Mar 21, 2011
Messages
1,611
Hi guys,

I've got a problem with changing the flying height via trigger.
You should know that the unit is basicly flying (no need to add Storm Crow ability) and i'm using Bribe's Unit Indexer.
The ability should work like that: The casting unit (flying) drops a bomb (dummy/flying) that falls down and explodes on the ground. But the flying height stays the same :/

  • Explosive Barrels 1
    • Events
      • Unit - A unit starts the effect of an ability
    • Conditions
      • Ability being cast equal to Explosive Barrels
    • Actions
      • Set ExplosiveBarrels_Point = (Position of (Triggering unit))
      • Set ExplosiveBarrels_Counter = (ExplosiveBarrels_Counter + 1)
      • Unit - Create 1 Dummy_Barrel for (Triggering Player) at ExplosiveBarrels_Point facing blablabla degrees
      • Set ExplosiveBarrels_Unit = (Last created unit)
      • Set ExplosiveBarrels_Index = (Custom value of ExplosiveBarrels_Unit)
      • Set ExplosiveBarrels_Height[ExplosiveBarrels_Index] = 230.00
      • Unit Group - Add ExplosiveBarrels_Unit to ExplosiveBarrels_Group
      • Custom script: call RemoveLocation (udg_ExplosiveBarrels_Point)
      • Trigger - Turn on Explosive Barrels 2 <gen>
  • Explosive Barrels 2
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in ExplosiveBarrels_Group and do (Actions)
        • Loop - Actions
          • Set ExplosiveBarrels_Unit = (Picked unit)
          • Set ExplosiveBarrels_Index = (Custom value of ExplosiveBarrels_Unit)
          • Set ExplosiveBarrels_Height[ExplosiveBarrels_Index] = (ExplosiveBarrels_Height[ExplosiveBarrels_Index] - 3.00)
          • Animation - Change ExplosiveBarrels_Unit flying height to ExplosiveBarrels_Height[ExplosiveBarrels_Index] at 0.00
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Conditions
              • ExplosiveBarrels_Height[ExplosiveBarrels_Index] equal to 0.00
            • 'THEN'-Actions
              • Unit - Kill ExplosiveBarrels_Unit
              • Set ExplosiveBarrels_Counter = (ExplosiveBarrels_Counter - 1)
            • 'ELSE'-Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Conditions
          • ExplosiveBarrels_Counter equal to 0
        • 'THEN'-Actions
          • Trigger - Turn off (This trigger)
        • 'ELSE'-Actions
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
The trigger seems to be ok. What happens if you modify the flying heigh of a unit of that type with another trigger? Are you sure the movement type is fly?

You could post the map.

By the way, you might not need the looping trigger. Set the flying height to 230 at 0, then to 0 at 60. The 60 comes from 3/0.05. And give the unit 230/60 = 3,83 second expiration timer.
 
Status
Not open for further replies.
Top