• 0

    posted a message on Use any unit of a unit type.

    Thanks for the tips! I just want the Annihilator to use its shadow cannon so getting the cannon to autocast would be good (hopefully it works). I've thought of a way to do this before putting the created annihilator into an attack wave (autocast caused it to stop moving towards the enemy base). However I'd still like to know if there is something to the effect of "unit of unit type" even if I have to use a unit type variable. I've already had to work around an apparent lack of one.

     

    Here's another part that I had to work around using the "grab unit" function. A pylon is being guarded by four zealots and each time one dies it is replaced. At the end of the level a warp prism loads up the remaining four zealots. So I used the "Change owner" action with the "grab unit" function and "add unit to unit group" action to individually add each zealot to a unit group to be picked up by the warp prism. I am guessing there is a neater way of doing this.

     

    That was my first post and I appreciate your patience with my noobiness.

    Posted in: Triggers
  • 0

    posted a message on Use any unit of a unit type.

    I would like to use a trigger using a unit type but I can't work it out without using the limiting "grab unit" function and I haven't been able to find any functions that use a unit type variable or find sufficient information to solve my problem. I'd like to know how to use unit types. For example:

     

    Events

                Any unit enters region (position of unit of (mysterious unit type function)* that somehow belongs to player 2)

    *any unit preset doesn't exist in this context. Thus I don't begin to know of any condition solution.

    Conditions

                Triggering Unit belongs to player 1

                Triggering Unit is Annihilator

    Events

                Order Triggering Unit to (...Shadow Cannon... targeting unit of (mysterious unit type function) before existing orders) 

    Posted in: Triggers
  • To post a comment, please or register a new account.