• 0

    posted a message on (Solved) Specific Unit Respawn and Given Ownership to Killer

    Yes

     

    thanks DrSuperEvil, 

     

    your suggestions solved  the problem !

    Posted in: Triggers
  • 0

    posted a message on (Solved) Specific Unit Respawn and Given Ownership to Killer

    Hey there guys,

     

    I'm new to SC2's Editor, and I was hoping some of you could help me with a Respawning problem I have. I did some looking around the forum for existing possible solutions but couldn't find anything that was helpful for me.

     

    Here's what I'm trying to do, a map with 10 players,  whenever a specific building that is initially owned by player 5 dies,  the building respawns  and is owned by the killing player. This can happen multiple times, players can control and lose that building many times over the length of the game.

     

    I've tried using Regions, points, unit groups, and even the "revive unit" trigger but nothing worked. The closest i've gotten is this:

     

    1st trick

    Event

    Unit - X [41.07 ,203.89] dies

    Condition

    (Killing Player ==1)

    Actions

    Unit - Revive X [41.07 ,203.89]

    Unit - Set X [41.07 ,203.89] Life to 1000

    Unit - Change ownership of  X [41.07 ,203.89] to player (Killing player) and Change Color

     

    the problem is 2 folds, the building, which is essentially a Ghost Academy, reverts from the unit X to a legitimate Ghost Academy when it revives ( since the building is no longer "X" it affects other triggers)  , and 2, the builds has the fire animation even though it's at full health.

     

    2nd trick

    I created a region called " X Region", and attached that region to my initial building X that I placed. Made sure that there's no other unit in taht region and only attached the region to the building X 

    Event

    Unit - Unit attached to Region dies

    Condition

    (Killing Player ==1)

    Actions

    Unit - Create 1 X for player (Killing Player) at (Center of X Region) facing (Position of  (Trigering Unit))(No Option)

    Attach Region X to Last Created Unit

     

    while this respawned the building X instead of the legitimate Ghost Academy, killing ANY unit of player 5 resulted in the a copy of building X being spawned. As you may have guessed, there can be only 1 building X in the map.

     

    Any ideas on how to achieve this goal of having a building respawn under the control of the killing player on possibly multiple occassions?

     

    Thanks for the help, 

     

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