How can you change unit to flying via triggers?

Discussion in 'Starcraft 2 (SC2) Editor Help' started by Danage, Jul 21, 2011.

  1. Danage

    Danage New Member

    Ratings:
    +0 / 0 / -0
    I would like to know how to change a unit to flying without changeing the unit, like just change the unit from ground type to flying type.

    I don't want it to change unit because the unit is moving at the time it happens and it makes it look wrong... like the unit lags or something...

    Thanks guys
     
  2. Nerfpl

    Nerfpl New Member

    Ratings:
    +53 / 0 / -0
    You can try adding behavior which will allow unit to move as flyer and modify height if need
     
  3. Danage

    Danage New Member

    Ratings:
    +0 / 0 / -0
    You can do that? Give a behavior to a ground unit and it lets it move over cliffs? Could you please tell me how to make that behavior?
     
  4. Dave312

    Dave312 Censored for your safe viewing

    Ratings:
    +269 / 0 / -0
    Unfortunately there is no way to change the mover of a unit in-game, so you can't use a behaviour to turn the unit into a flyer. The alternative is to create a duplicate unit with a mover which makes it a flyers, and then use an ability to morph between the two units as required.
     
  5. Danage

    Danage New Member

    Ratings:
    +0 / 0 / -0
    Can you get the morph ability to change the unit instantly while the unit is on the move so there is no pause? If so how do I make this morph ability? Like what flags and stuff to get that going, thanks.
     
  6. Danage

    Danage New Member

    Ratings:
    +0 / 0 / -0
    I could still use some help, and is there any way to set a variable up with multiple initial values when using indexing?
     
  7. Danage

    Danage New Member

    Ratings:
    +0 / 0 / -0
    For some reason it displays the message 7 times when I cast the ability, why on earth is it doing that? It's acting as if I'm casting the ability 7 times when infact I'm only casting it once...
     
  8. celerisk

    celerisk When Zerg floweth, life is good

    Ratings:
    +62 / 0 / -0
    "Any stage" looks like a potential problem.
    Off the top of my head, I'd go with Approach, Prepare, Cast, Channel and End as possible stages (did I miss any?).
    As such, this event happens somewhat more often than just once.



    > is there any way to set a variable up with multiple initial values when using indexing?

    Probably. Though, what you mean with "using indexing"?
     
  9. Dave312

    Dave312 Censored for your safe viewing

    Ratings:
    +269 / 0 / -0
    Sorry I just haven't had a chance to go through and find all the things you need to get this working.

    Abilities are divided up in multiple stages. Using "Any Stage" means the trigger will activate when any of the stages is completed. The ability you are using has 7 stages, hence you get the message 7 times despite the ability being only cast once.

    You can set the default value for all the indices's, but not for each index. You will have to run a trigger with the "Set Variable" action and set it that way.
     
  10. Danage

    Danage New Member

    Ratings:
    +0 / 0 / -0
    That makes so much sense... I was way off, thank you.

    Damn, I was hopeing I could set multiple initial values in a single variable... I guess the only way is to add them to the variables index after the games loaded, thank you.
     
  11. Siretu

    Siretu Starcraft 2 Editor Moderator Staff Member

    Ratings:
    +295 / 0 / -0
    I am quite sure you are wrong. I can't test it out now since I am at work but isn't the plane delta what you want to change in the Behavior - Modification? Otherwise I think the behavior can modify the mover, but I might be wrong on that part as well.
     
  12. Dave312

    Dave312 Censored for your safe viewing

    Ratings:
    +269 / 0 / -0
    That is what I thought. But when I looked into it, I found a thread over at sc2mapster where they found the plane delta only affected the targeting plane of the unit. I might try and test it out myself.

    I also tried looking into modifying the mover with a behaviour, but was unable to find a way to do it.
     
  13. Siretu

    Siretu Starcraft 2 Editor Moderator Staff Member

    Ratings:
    +295 / 0 / -0
    Ah, I was quite sure it would work. I've used it for custom graviton beams but since the unit is incapable of moving, i've just assumed it would change the mover as well.

    Upgrades can change certain things about most things. What about a temporary upgrade or something?
     
  14. Dave312

    Dave312 Censored for your safe viewing

    Ratings:
    +269 / 0 / -0
    Wouldn't the upgrade affect every unit of that type for that player?
     
  15. Siretu

    Siretu Starcraft 2 Editor Moderator Staff Member

    Ratings:
    +295 / 0 / -0
    Yes, that's why I wasn't certain. It depends on the situation. If there's only one unit that needs to fly for each player, it would work.
     
  16. Dave312

    Dave312 Censored for your safe viewing

    Ratings:
    +269 / 0 / -0
    I've tested this and indeed this is correct. The plane delta only affects the targeting plane and does not allow units to move as an air unit.


    EDIT:
    I have finally managed to come up with a solution for this by morphing the unit into a new unit. Here is how to do it.
    1) Duplicate your unit and change the mover to a flyer.
    2) Create a new button which will be used for issuing the command.
    3) Create a new ability of the type Morph and set these values:
    - Set the Execute button to the button previously created under the Ability - Commands + property
    - Open up the Ability - Info property, right-click then Add... and select your unit with the flyer mover
    - Open up the Stats - Flags property and check Ignore Facing
    4) Create a new effect of the type Issue Order and set these values:
    - Set the Ability - Ability property to the morph ability you just created.
    - Open up the Effect - Command Flags property and check Preempt
    - Set the Unit - Unit + property to Caster (just the value part)
    5) Now create another new ability of the type Effect - Instant and set these values:
    - Set the Execute button to the button previously created under the Ability - Commands + property
    - Set the Effect - Effect property to the issue order effect you have just created.
    - Open up the Stats - Flags property and check Transient
    6) Go to your unit (the one with the ground mover) and add the two abilities you have just created.
    7) Now go into the command card and select an empty slot, add the button you previously created and set these values on it:
    - Command Type to Ability Command
    - Ability to the Issue Order ability you created
    - Ability Command to the button you created (should be the only option to choose from)

    And that's it. You can repeat the above process to and change the morphing unit to get the unit go back to the ground mover.
     
    • Like Like x 1
  17. Siretu

    Siretu Starcraft 2 Editor Moderator Staff Member

    Ratings:
    +295 / 0 / -0
    Will this stop the unit that is morphing if it's already moving somewhere?
     
  18. Dave312

    Dave312 Censored for your safe viewing

    Ratings:
    +269 / 0 / -0
    If you use just a straight morphing ability, the unit will stop. However by giving it an ability which orders it to use the morph ability, you can use the transient property which will make it continue what it is doing. As such, the unit will morph and continue on it's way like nothing ever happened.
     
  19. Siretu

    Siretu Starcraft 2 Editor Moderator Staff Member

    Ratings:
    +295 / 0 / -0
    Nice, in that case it might be useful for me as well!
     

Share This Page