• 🏆 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!

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.
 
Level 7
Joined
Dec 5, 2013
Messages
280
Already deleted the trigger because it just didnt work, even if I removed one of the actions.

All parts of the trigger were mentioned.
 
Level 7
Joined
Jun 28, 2013
Messages
395
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.
 
Level 7
Joined
Dec 5, 2013
Messages
280
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?
 
Level 7
Joined
Jun 28, 2013
Messages
395
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.
 
Level 7
Joined
Dec 5, 2013
Messages
280
Thank you

Also, how to get unit cast spells while gliding in the air with flying animation?
 
Level 7
Joined
Jun 28, 2013
Messages
395
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. :)
 
Level 7
Joined
Dec 5, 2013
Messages
280
But the base unit is ground based, how can I make it actually fly? it also hovers under the terrain
 
Level 7
Joined
Dec 5, 2013
Messages
280
  • 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
 
Level 7
Joined
Jun 28, 2013
Messages
395
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
 
Level 7
Joined
Dec 5, 2013
Messages
280
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
 
Level 7
Joined
Jun 28, 2013
Messages
395
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.
 
Level 7
Joined
Jun 28, 2013
Messages
395
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.
 
Level 7
Joined
Dec 5, 2013
Messages
280
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
 
Level 7
Joined
Jun 28, 2013
Messages
395
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.
 
Level 7
Joined
Dec 5, 2013
Messages
280
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.
 
Level 7
Joined
Jun 28, 2013
Messages
395
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.
 
Level 7
Joined
Dec 5, 2013
Messages
280
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.
 
Level 7
Joined
Jun 28, 2013
Messages
395
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
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
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)
 
Level 7
Joined
Dec 5, 2013
Messages
280
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.
 
Level 7
Joined
Jun 28, 2013
Messages
395
it is neutral hostile? I think issue order doesnt work on neural hostile. Sry i dun understnad that sentence.
 
Level 7
Joined
Dec 5, 2013
Messages
280
Boss is neutral hostile and move order works because I managed to make another neutral hostile to patrol area with move commands.
 
Level 7
Joined
Jun 28, 2013
Messages
395
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.
 
Level 7
Joined
Dec 5, 2013
Messages
280
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"
 
Level 7
Joined
Dec 5, 2013
Messages
280
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
 
Level 7
Joined
Jun 28, 2013
Messages
395
Order him to hold position but that is also ordering :< but I thought you want him to move?
 
Level 7
Joined
Dec 5, 2013
Messages
280
I want the boss to ignore all units and fly to region X and periodically stop to cast some spell
 
Level 7
Joined
Jun 28, 2013
Messages
395
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.
 
Level 7
Joined
Jun 28, 2013
Messages
395
Just use passive hero transformation since I think it should be better to use. Good luck. :)
 
Level 7
Joined
Dec 5, 2013
Messages
280
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
 
Level 7
Joined
Dec 5, 2013
Messages
280
It was normal move command, and i tested that trigger without enemies around and it worked fine
 
Level 7
Joined
Jun 28, 2013
Messages
395
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.
Top