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

[General] Getting a shipyard to change ownership

Status
Not open for further replies.
Level 11
Joined
Feb 2, 2011
Messages
342
In my map I have one invulnerable shipyard controlled by Player 1 Red and two others controlled by Neutral Passive.

I want one of the two shipyards to change from Neutral Passive ownership to Player 1 Red ownership when their primary hall upgrades to Keep, and the last when the primary hall upgrades to Castle.

How would I do this with triggers?
 
Level 21
Joined
Nov 4, 2013
Messages
2,017
  • Main Hall Upgrade
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
    • Actions
      • If ((Unit-type of (Triggering unit)) Equal to Keep) then do (Unit - Change ownership of First Shipyard to Player 1 (Red) and Change color) else do (Do nothing)
      • If ((Unit-type of (Triggering unit)) Equal to Castle) then do (Unit - Change ownership of Second Shipyard to Player 1 (Red) and Change color) else do (Do nothing)
I guess this is what you want.
 
Level 11
Joined
Feb 2, 2011
Messages
342
  • Main Hall Upgrade
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
    • Actions
      • If ((Unit-type of (Triggering unit)) Equal to Keep) then do (Unit - Change ownership of First Shipyard to Player 1 (Red) and Change color) else do (Do nothing)
      • If ((Unit-type of (Triggering unit)) Equal to Castle) then do (Unit - Change ownership of Second Shipyard to Player 1 (Red) and Change color) else do (Do nothing)
I guess this is what you want.

Yes, thank you. I was looking for Event Response - Upgraded Structure, but this worked just as well as that option could have, if it was present in the editor.
 
Status
Not open for further replies.
Top