• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Dragon flying trigger

Status
Not open for further replies.
Level 7
Joined
Dec 5, 2013
Messages
280
I am trying to get dragon to get up in flying mode when it has X health and fly for a moment between few location and then get back to ground.

My trigger has only event unit life becomes less or equal to X and action is play animation and move to center of the region X, nothing else is in the trigger but nothing happens.
 
Already deleted the trigger because it just didnt work, even if I removed one of the actions.

All parts of the trigger were mentioned.
 
If the dragon was in land mode before, then give the dragon a morph ability that makes him fly in object editor. (You must create 2 units for it, one land version and one flying version) Then in the code, when the dragon reach a certain amount of hp, then order issue the dragon to use the ability and order to move to the location.
 
What do you mean two units? if there is some flying ability then why do i need two units? also how can different unit react if one unit casts some spell?
 
The morph spell changes the first unit to flying unit but they are still the same but only one is flying and one is not. Use this so you could change the animation type, movement type rather than just play the animation but it is still a land unit.

So, finish up your dragon (land version) in Object Editor then copy it and paste. The paste version, only change the movement type to flying. If the flying animation is alternate, then change the required animation to alternate.

Then create an ability (based on Crow Form) and put the land unit into the "First unit data" then put the flying uniy into the "Second Unit data". give the ability to the dragon, both of them.

Then when u need it to fly, order it to cast the ability, then it'll fly. Order him to move to that location. Then order him to cast the ability again when u want him back on land.
 
Thank you

Also, how to get unit cast spells while gliding in the air with flying animation?
 
When you order him to move, he'll move. While moving, just normally order him to cast the spell. The dragon will change his current order to cast the spell. So, there is no problem, just simply order him to cast the spell when he is ready or anyhting. :)
 
But the base unit is ground based, how can I make it actually fly? it also hovers under the terrain
 
  • unit - "unit name" life becomes less than or equal to X
  • unit - add morph to "unit"
  • unit order - "unitname" to cast morph
this trigger causes fatal error after unit casts morph ability, something about unable to read memory
 
Okay, make sure the 2 units in the morph ability is the same type.(if the first unit is non-hero, then the next unit should be non-hero and vice versa, otherwise it would crash.)

The morph ability have 2 tables for a unit data type each, the first one should be landing one, the second one should be the flying one.

And add the ability to the unit in the Object Editor, to both of them then just order them to cast the ability.

If any of those is still not working, then post your trigger, the object editor of the dragon and the ability table, i need to see if you're doing it right. :)
 
But the base unit is ground based, how can I make it actually fly? it also hovers under the terrain

There is a field for flying height... also set movement type to fly or hover

and if you can link us to the model, it might be of help too

depending on what you want, you might not even need to use morph and two units... this might be possible with using just triggers
 
model is deathwing from hiveworkshop

I need the flying unit to behave exactly like flying unit, so the second unit needs to be air based, there are no air heroes and the first one is hero
 
first one is the hero then the second one needs to be a hero also. just copy your current dragon and paste it as hero. You can change a hero movement type to flying.
 
U need to change from "Movement - Type = Foot" to "Movement - Type = Fly" to make it fly.

If you want the flying animation, find this field "Art - Required Animation Names", select it and add "alternate" to it.
 
I already set movement type to fly, and set animation names to alternate, and tried many different height numbers but it still doesnt fly because it cant move across units and "flies" in ground level
 
Change the height only.

Can you post out your object editor units and spell? I have a map using also deathwing model n mine just work normally, surely there is one thing that is wrong with your OE.
 
The morph spell works, the unit changes and the second unit has correct flying animation but it doesnt fly no matter what I set as height.
 
Have you check the second unit? Check whether it is movement type is fly. Then check the "movement - height" part. if it is 0 then it will be on ground, iincrease it to make it look like it is flying.
 
Units in spell settings were not the proper units and it now works.

But when I order the unit to move to X region when morphing, it doesnt move anywhere and just keep attacking units from air.
 
okay order him to morph first, then order him to move.

If fail, order him to morph then wait for awhile then only order him to move
 
okay order him to morph first, then order him to move.

If fail, order him to morph then wait for awhile then only order him to move

Morphing takes a slight bit of time, so you can't give both orders right away.
Fixing this is a bit complicated though.
You can either use Passive Hero Transformation. The reason this works is that it doesn't require an order to morph.
The other option: you can add the unit to a group and periodically check whether the units in that group are still morphing(whether their current order is your morph ability)
 
Morph action is before move order but doesnt work, also tried wait command in between

How does that guide differs from crow ability what I have used now? also the normal form is the unit what its morphing to, not from and it works as intended for me. Ground mode dragon morphs into flying mode.
 
it is neutral hostile? I think issue order doesnt work on neural hostile. Sry i dun understnad that sentence.
 
Boss is neutral hostile and move order works because I managed to make another neutral hostile to patrol area with move commands.
 
I see. Then the problem is u cant interfere with the morph command.

When u use wait then command again, what unit u put? "Triggering Unit" doesnt work after wait. If u use "Triggering Unit" then at the top of the trigger, store the triggering unit in a variable which is later use for moving.
 
Why doesnt order Deathwing to move to center of region work?

There is no "triggering unit", it selected the unit I want to command in place of "triggering unit"
 
I tested that morph and move command when there was no enemies around the boss, and the trigger works fine

The problem is that unit stops to attack enemies and ignores the move command
 
I want the boss to ignore all units and fly to region X and periodically stop to cast some spell
 
When he fly up, try not to use wait, use timer instead. Start the timer for 5 seconds, create a new trigger when the 5 seconds expired only order him to move to the location.
 
Move command worked fine with morphing, the issue was that move command gets interrupted if there are hostile units in range which causes the unit to attack those units instead of moving
 
It was normal move command, and i tested that trigger without enemies around and it worked fine
 
Yea, normal move ignore units, attack-move only start to attack units within range. :/

You can set the acquisition range to 0 via triggers, so the units won't attack units automatically. Then remember to set it bk to default acquisition range when after the flying stuff ends
 
Status
Not open for further replies.
Back
Top