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

[Trigger] Help,

Status
Not open for further replies.
Level 19
Joined
Jun 16, 2007
Messages
1,574
Hello i need help with this trigger MapperForLife didint know another trigger for this so it makes sure before choosing a unit that if you already have one you can't create another one.

  • Selection System
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
      • Player - Player 5 (Yellow) Selects a unit
      • Player - Player 6 (Orange) Selects a unit
      • Player - Player 7 (Green) Selects a unit
      • Player - Player 8 (Pink) Selects a unit
      • Player - Player 9 (Gray) Selects a unit
      • Player - Player 10 (Light Blue) Selects a unit
      • Player - Player 11 (Dark Green) Selects a unit
      • Player - Player 12 (Brown) Selects a unit
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Footman
          • (Unit-type of (Triggering unit)) Equal to Footman
          • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • Unit - Create 1 (Unit-type of (Triggering unit)) for (Triggering player) at (Center of Start <gen>) facing Default building facing degrees
 
Last edited by a moderator:

Deleted member 126647

D

Deleted member 126647

This goes in the trigger section.

Moved.
 
Level 8
Joined
Oct 8, 2005
Messages
409
make a boolean array with 12 slots and call it "Have_Hero"

then use an if statement to check if Have_Hero(Player number of triggering player) = true

add this action action: set Have_Hero(Player number of triggering player) = true

move all your actions inside of the if statement
 
Level 19
Joined
Jun 16, 2007
Messages
1,574
would this work ?

  • Selection System
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Footman
          • (Unit-type of (Triggering unit)) Equal to Footman
          • (Unit-type of (Triggering unit)) Equal to Footman
          • And - All (Conditions) are true
            • Conditions
              • (Number of units in (Units owned by (Triggering player))) Equal to 0
    • Actions
      • Unit - Create 1 (Unit-type of (Triggering unit)) for (Triggering player) at (Center of (Playable map area)) facing Default building facing degrees
 
Status
Not open for further replies.
Top