• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

A problem with triggering

Status
Not open for further replies.
Level 6
Joined
Apr 20, 2007
Messages
232
I want that IF the player is human , that is playing --- that will add a unit to a specific place. Here's what I do :

  • Events
  • Time - Elapsed game time is 5.00 seconds
  • Conditions
  • (Player 1 (Red) controller) Equal to User
  • Actions
  • Unit - Create 1 Orc Teenager for Player 1 (Red) at (Center of Wisps Spawn Place <gen>) facing Default building facing degrees
The problem is , when i start testing , it adds Orc Teenagers for all players ( i am testing map , so i am the only "user"). This makes me stuck. Please help.
 
Level 15
Joined
Feb 9, 2006
Messages
1,598
First of all, that trigger will only create an Orc Teenager for player 1. Second, I'm not really shure what you're saying here. Do you want an Orc Teenager to be created to all players as long they're not computers ? In case, this is the trigger:

  • Trigger
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) slot status) Equal to Is playing
              • ((Picked player) controller) Equal to User
            • Then - Actions
              • Unit - Create 1 Orc Teenager for (Picked player) at (Center of (Wisps Spawn Place )) facing Default building facing degrees
            • Else - Actions
~Operator
 
As you said u just need a conditon for that so addd it
for example you could do it this way :
  • Actions
  • Playergroup - Pick every player in (All players) and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Conditions
          • ((Picked player) controller) Gleich Benutzer
          • ((Picked player) slot status) Gleich Spielt
        • 'THEN'-Actions
          • Unit - Create 1 Orc Teenager for (Picked player) at (Center of Wisps Spawn Place <gen>) facing Default building facing degrees
        • 'ELSE'-Actions
( Damn i still dont have the german editor so code could be a bit wrong but i guess u know what i mean )
 
Level 6
Joined
Apr 20, 2007
Messages
232
First of all, that trigger will only create an Orc Teenager for player 1. Second, I'm not really shure what you're saying here. Do you want an Orc Teenager to be created to all players as long they're not computers ? In case, this is the trigger:

  • Trigger
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) slot status) Equal to Is playing
              • ((Picked player) controller) Equal to User
            • Then - Actions
              • Unit - Create 1 Orc Teenager for (Picked player) at (Center of (Wisps Spawn Place )) facing Default building facing degrees
            • Else - Actions
~Operator

Thanks , it worked :D.
 
Status
Not open for further replies.
Top