• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Help Flying a Unit

Status
Not open for further replies.
Level 2
Joined
May 18, 2010
Messages
16
Hey guys im not very good at making maps and kept looking at other people their maps but heres a trigger I made.

I tried to make the WarStomp ability into some ability that would throw up all the enemys near the casting unit.

But I dont see what I did wrong here ive tried so many things:

  • Dwarf WarStomp
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Unit-type of (Casting unit)) Equal to Dwarf
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to War Stomp
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 300.00 of (Position of (Casting unit))) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Owner of (Picked unit)) Not equal to (Owner of (Casting unit))
                • Then - Actions
                  • Game - Display to (All players) the text: 1
                  • Unit - Add Crow Form to (Picked unit)
                  • Animation - Change (Picked unit) flying height to 1000.00 at 0.00
                  • Unit - Pause (Picked unit)
                  • Game - Display to (All players) the text: 2
                  • Animation - Change (Picked unit) flying height to 0.00 at 0.00
                  • Unit - Remove Crow Form from (Picked unit)
                  • Unit - Unpause (Picked unit)
                  • Game - Display to (All players) the text: 3
                • Else - Actions
        • Else - Actions
I hope someone can help I mean its a stupid trigger but still I would like to know what I did wrong here.

What I tried: Adding the Wait action just before Removing crow form then when I test is the units just fly in the air.
So I tried switching some stuff but its confusing.
 
Last edited by a moderator:
I could give you a better trigger for this, so as to define the duration of units that will be lying in the mid-air, but you can also use impale.

Note: In order to change the height of a ground unit, simply add the Crow Form ability and remove it instantly:
  • Unit - Add Crow Form to (Picked unit)
  • Unit - Remove Crow Form from (Picked unit)
Make an ability based off the "Impale", set its AoE to 300 and then:
  • Trigger
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Dwarf
  • Actions
    • Set Point1 = (Position of (Triggering unit))
    • Unit - Create 1 Footman for (Owner of (Triggering unit)) at Point1 facing Default building degrees
    • Unit - Hide (Last created unit)
    • Custom script: call UnitRemoveAbility (GetLastCreatedUnit(), 'Aatk')
    • Unit - Add Impale (Dummy) to (Last created unit)
    • Custom script: call IssuePointOrderLoc (GetLastCreatedUnit(), "impale", udg_Point1)
    • Custom script: call RemoveLocation (udg_Point1)
Make sure the Impale ability has no mana cost and targets enemy, ground, organic.
 
Level 2
Joined
May 18, 2010
Messages
16
I rlly didnt want that I just want to be able to fix my trigger and when I just did add crow form and remove crow form it doesnt do anything. So how can I fix it ?

Edit: I did the impale thing but its ugly and doesnt always work. So back to this crow form problem. I tried everything and checked my other map where the Caster jumped to a location and that one I understand but here I pick a unit group and they stay in the air or just stay on the ground like nothing happened.
Help me :(
 
Last edited:
Level 4
Joined
Jan 27, 2010
Messages
133
You cannot have Waits in Unit Group loops.

Do you get all debug output? If yes, I think your units fly into the air; but is directly pulled back again (since there is no time in between).

This might work better: (Victims is a Unit Group variable)

  • Set Victims = (Units within 300.00 of (Position of (Casting unit)))
  • Unit Group - Pick every unit in Victims and do (Actions)
    • Loop - Actions
      • Add Crow Form and make unit fly
  • Wait 2.00 seconds
  • Unit Group - Pick every unit in Victims and do (Actions)
    • Loop - Actions
      • Take it down
You can also toy with the time parameter; to not make them jump up instantly.

Just notice that this won't be MUI, but I assume that's not what you've set out to do with this spell?
 
Status
Not open for further replies.
Top