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

Allies and Forces

Status
Not open for further replies.
Level 5
Joined
Jan 15, 2018
Messages
128
My question is about allies. this trigger here has Mint joining the Evil team (red, purple, coal). Players have choices to join the evil, good or hostile team. Lets say Green joins the Evil team too, how can i make so green and mint are allied contingent on them choosing to join the evil team?
does that make since?

  • Jevil
    • Events
      • Unit - A unit owned by Player 19 (Mint) Finishes research
    • Conditions
      • (Researched tech-type) Equal to Serve the Dark Lord (harad)
    • Actions
      • Player - Make Player 19 (Mint) treat Player 1 (Red) as an Ally
      • Player - Make Player 19 (Mint) treat Player 4 (Purple) as an Ally
      • Player - Make Player 19 (Mint) treat Player 21 (Coal) as an Ally
      • Player - Add 300 to Player 19 (Mint) Current gold
      • Player - Add 300 to Player 19 (Mint) Current lumber
 
Create a new empty player group variable (called EvilTeam, or something easily identifiable) and add player 1, 4, and 21 to the group at map initialization.
  • Team Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Add Player 1 (Red) to EvilTeam
      • Player Group - Add Player 4 (Purple) to EvilTeam
      • Player Group - Add Player 21 (Coal) to EvilTeam
Joining the "evil team" becomes as easy as this:
  • Join Evil Team
    • Events
      • Unit - A unit Finishes research
    • Conditions
      • (Researched tech-type) Equal to Dark Lord (harad)
    • Actions
      • -------- Iterate through all players of the evil team and set the alliance state with the triggering player --------
      • Player Group - Pick every player in EvilTeam and do (Actions)
        • Loop - Actions
          • Player - Make (Picked player) treat (Triggering player) as an Ally
          • Player - Make (Triggering player) treat (Picked player) as an Ally
      • -------- Add the triggering player to the evil team player group --------
      • Player Group - Add (Triggering player) to EvilTeam
      • -------- Add player properties --------
      • Player - Add 300 to (Triggering player) Current gold
      • Player - Add 300 to (Triggering player) Current lumber
 
Status
Not open for further replies.
Top