1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Dragon flying trigger

Discussion in 'Triggers & Scripts' started by Foxace, Dec 17, 2013.

  1. Foxace

    Foxace

    Joined:
    Dec 5, 2013
    Messages:
    280
    Resources:
    0
    Resources:
    0
    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.
     
  2. Nichilus

    Nichilus

    Joined:
    Sep 26, 2009
    Messages:
    1,968
    Resources:
    0
    Resources:
    0
    can you post the trigger? Even if it's simple and short
     
  3. Foxace

    Foxace

    Joined:
    Dec 5, 2013
    Messages:
    280
    Resources:
    0
    Resources:
    0
    Already deleted the trigger because it just didnt work, even if I removed one of the actions.

    All parts of the trigger were mentioned.
     
  4. xAerox

    xAerox

    Joined:
    Jun 28, 2013
    Messages:
    370
    Resources:
    0
    Resources:
    0
    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.
     
  5. Foxace

    Foxace

    Joined:
    Dec 5, 2013
    Messages:
    280
    Resources:
    0
    Resources:
    0
    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?
     
  6. xAerox

    xAerox

    Joined:
    Jun 28, 2013
    Messages:
    370
    Resources:
    0
    Resources:
    0
    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.
     
  7. Foxace

    Foxace

    Joined:
    Dec 5, 2013
    Messages:
    280
    Resources:
    0
    Resources:
    0
    Thank you

    Also, how to get unit cast spells while gliding in the air with flying animation?
     
  8. xAerox

    xAerox

    Joined:
    Jun 28, 2013
    Messages:
    370
    Resources:
    0
    Resources:
    0
    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. :)
     
  9. Foxace

    Foxace

    Joined:
    Dec 5, 2013
    Messages:
    280
    Resources:
    0
    Resources:
    0
    Doesnt the boss stop for duration of casting and then continue moving?
     
  10. Rheiko

    Rheiko

    Joined:
    Aug 27, 2013
    Messages:
    2,936
    Resources:
    7
    Icons:
    2
    Spells:
    3
    Tutorials:
    2
    Resources:
    7
    nope, he won't continue moving
     
  11. Foxace

    Foxace

    Joined:
    Dec 5, 2013
    Messages:
    280
    Resources:
    0
    Resources:
    0
    But the base unit is ground based, how can I make it actually fly? it also hovers under the terrain
     
  12. Foxace

    Foxace

    Joined:
    Dec 5, 2013
    Messages:
    280
    Resources:
    0
    Resources:
    0
    • 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
     
  13. xAerox

    xAerox

    Joined:
    Jun 28, 2013
    Messages:
    370
    Resources:
    0
    Resources:
    0
    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. :)
     
  14. Adiktuz

    Adiktuz

    Joined:
    Oct 16, 2008
    Messages:
    9,674
    Resources:
    23
    Models:
    2
    Packs:
    1
    Maps:
    1
    Spells:
    16
    Tutorials:
    1
    JASS:
    2
    Resources:
    23
    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
     
  15. Foxace

    Foxace

    Joined:
    Dec 5, 2013
    Messages:
    280
    Resources:
    0
    Resources:
    0
    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
     
  16. xAerox

    xAerox

    Joined:
    Jun 28, 2013
    Messages:
    370
    Resources:
    0
    Resources:
    0
    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.
     
  17. Foxace

    Foxace

    Joined:
    Dec 5, 2013
    Messages:
    280
    Resources:
    0
    Resources:
    0
    Where was the height setting? movement height doesnt do anything
     
  18. xAerox

    xAerox

    Joined:
    Jun 28, 2013
    Messages:
    370
    Resources:
    0
    Resources:
    0
    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.
     
  19. Foxace

    Foxace

    Joined:
    Dec 5, 2013
    Messages:
    280
    Resources:
    0
    Resources:
    0
    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
     
  20. xAerox

    xAerox

    Joined:
    Jun 28, 2013
    Messages:
    370
    Resources:
    0
    Resources:
    0
    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.