[Trigger] CAnt find right units

Status
Not open for further replies.
Level 2
Joined
Apr 11, 2008
Messages
19
Im triing to make a who is the killer type map, exept one player is akiller and another is a hero and everyone else is normal

For somer eason all of them become normal, and there is no killer or hero selected...

This is the trigger, any ideas?

  • Events
    • Time - SafeTimer expires
  • Conditions
  • Actions
    • Countdown Timer - Destroy (Last created timer window)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Number of players in InGame) Equal to 1
      • Then - Actions
        • Game - Defeat (Player((Integer A))) with the message: You need more playe...
      • Else - Actions
    • Unit Group - Pick every unit in (Random 1 units from (Units in (Playable map area)(((Owner of (Picked unit)) is in PlayingHeroes) Equal to True))) and do (Actions)
      • Loop - Actions
        • Set Demon = (Owner of (Picked unit))
        • Set Demonunit = (Picked unit)
        • Player Group - Remove (Owner of (Picked unit)) from PlayingHeroes
        • Game - Display to (Owner of (Picked unit)), at offset (0.00, 0.00) the text: |c00ff0000You sold ...
        • Unit - Add Abolish Magic to Demonunit
    • Unit Group - Pick every unit in (Random 1 units from (Units in (Playable map area)(((Owner of (Picked unit)) is in PlayingHeroes) Equal to True))) and do (Actions)
      • Loop - Actions
        • Set Hero = (Owner of (Picked unit))
        • Set herounit = (Picked unit)
        • Game - Display to (Owner of (Picked unit)), at offset (0.00, 0.00) the text: |c000000ffYou have ...
        • Unit - Add Bloodlust to herounit
    • Game - Display to (All players) the text: |c00ffff00It seems ...
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
You used (((Owner of (Picked unit)) is in PlayingHeroes) Equal to True) in the two pick ups?
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Your trigger makes no sense.

  • Game - Defeat (Player((Integer A))) with the message: You need more playe...
Who exactly is Player((Integer A)) seeing as this is not a loop ?

  • Unit Group - Pick every unit in (Random 1 units from (Units in (Playable map area)(((Owner of (Picked unit)) is in PlayingHeroes) Equal to True))) and do (Actions)
The hell is this ?
You are supposed to pick the units that match your condition.
Something like "pick every units in SOME_UNIT_GROUP that match SOME_CONDITIONS and do actions".
 
Level 2
Joined
Apr 11, 2008
Messages
19
I figured it would be something like that for the first one...

BUt i dont get whats wrong with the unit group one?

If you want to know how the units got into playingheroes

  • Events
    • Time - Elapsed game time is 0.50 seconds
  • Actions
    • For each (Integer A) from 1 to 11, do (Actions)
      • Loop - Actions
        • If ((((Player((Integer A))) controller) Equal to User) and (((Player((Integer A))) slot status) Equal to Is playing)) then do (Unit - Create 1 Archeon for (Player((Integer A))) at (Center of Spawn Here <gen>) facing Default building facing (270.0) degrees) else do (Do nothing)
        • Player Group - Add (Player((Integer A))) to PlayingHeroes
        • Player Group - Add (Player((Integer A))) to InGame
        • Player - Make (Player((Integer A))) treat (Player((Integer A))) as an Neutral
        • Trigger - Add to Setname <gen> the event (Player - (Player((Integer A))) types a chat message containing setname as A substring)
        • Set PLAYERNAME[(Integer A)] = (Name of (Player((Integer A))))
        • Set ColorStr[1] = |cCFFF0202
        • Set ColorStr[2] = |cCF0041FF
        • Set ColorStr[3] = |cCF1BE5B8
        • Set ColorStr[4] = |cCF530080
        • Set ColorStr[5] = |cCFFFFC00
        • Set ColorStr[6] = |cCFFE890D
        • Set ColorStr[7] = |cCF1FBF00
        • Set ColorStr[8] = |cCFE45AAF
        • Set ColorStr[9] = |cCF949596
        • Set ColorStr[10] = |cCF7DBEF1
        • Set ColorStr[11] = |cCF0F6145
        • Set ColorStr[12] = |cCF4D2903
        • Set Colorz[1] = red
        • Set Colorz[2] = blue
        • Set Colorz[3] = teal
        • Set Colorz[4] = purple
        • Set Colorz[5] = yellow
        • Set Colorz[6] = orange
        • Set Colorz[7] = green
        • Set Colorz[8] = pink
        • Set Colorz[9] = gray
        • Set Colorz[10] = light blue
        • Set Colorz[11] = dark green
        • Set Colorz[12] = brown
    • Game - Display to (All players) the text: |c008000ffYour sens...
    • Countdown Timer - Create a timer window for (Last started timer) with title Gather your senses
    • Countdown Timer - Start SafeTimer as a One-shot timer that will expire in 60.00 seconds
 
Status
Not open for further replies.
Top