• 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.

How come?

Status
Not open for further replies.
Level 9
Joined
Apr 28, 2009
Messages
538
How come this trigger does what it's supposed to do (remove from the game all units with no playing owner) when I test the map via World Editor, but when I test the map online (with other dudes) the trigger doesn't do what it's supposed to do?

Trigger:

  • Check Units
    • Events (not relevant)
    • Conditions (not relevant)
    • Actions
      • -------- -------------------------------- --------
      • Set FastGroup[1] = (Units in (Playable map area) matching (((Owner of (Matching unit)) slot status) Not equal to (!=) Is playing))
      • Unit Group - Pick every unit in FastGroup[1] and do (Unit - Remove (Picked unit) from the game)
      • Custom script: call DestroyGroup (udg_FastGroup[1])
      • -------- -------------------------------- --------
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())
 
Level 15
Joined
Aug 31, 2009
Messages
776
I use a similar type of trigger for my map, mine is slightly different of course:
  • Events
  • Conditions
  • Actions
    • Unit Group - Pick every unit in (Units of type Spirit of Selection) and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • ((Owner of (Picked unit)) slot status) Equal to Is playing
            • ((Owner of (Picked unit)) controller) Equal to User
          • Then - Actions
          • Else - Actions
            • Unit - Remove (Picked unit)
I really hate using the "matching unit" stuff because I generally make mistakes in the logic when using it, as such I recommend using a method similar to above where you select each unit on the map, and then compare if the unit is owned by an active player, and remove the unit as needed.
 
Level 15
Joined
Aug 11, 2009
Messages
1,606
How come this trigger does what it's supposed to do (remove from the game all units with no playing owner) when I test the map via World Editor, but when I test the map online (with other dudes) the trigger doesn't do what it's supposed to do?

Trigger:

  • Check Units
    • Events (not relevant)
    • Conditions (not relevant)
    • Actions
      • -------- -------------------------------- --------
      • Set FastGroup[1] = (Units in (Playable map area) matching (((Owner of (Matching unit)) slot status) Not equal to (!=) Is playing))
      • Unit Group - Pick every unit in FastGroup[1] and do (Unit - Remove (Picked unit) from the game)
      • Custom script: call DestroyGroup (udg_FastGroup[1])
      • -------- -------------------------------- --------
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())
I have the same problem in my map,who is the killer.
The trigger works perfectly for my tests...but in Bnet it doesn't do anything.
Anyone know the answer?
 
Level 5
Joined
May 3, 2009
Messages
129
Is this what you wanted ???


  • test
    • Events
    • Conditions
    • Actions
      • Set unitgroup[1] = (Units in (Playable map area) owned by Player 1 (Red))
      • Set unitgroup[2] = (Units in (Playable map area) owned by Player 2 (Blue))
      • Set unitgroup[3] = (Units in (Playable map area) owned by Player 3 (Teal))
      • Set unitgroup[4] = (Units in (Playable map area) owned by Player 4 (Purple))
      • Set unitgroup[5] = (Units in (Playable map area) owned by Player 5 (Yellow))
      • Set unitgroup[6] = (Units in (Playable map area) owned by Player 6 (Orange))
      • Set unitgroup[7] = (Units in (Playable map area) owned by Player 7 (Green))
      • Set unitgroup[8] = (Units in (Playable map area) owned by Player 8 (Pink))
      • Set unitgroup[9] = (Units in (Playable map area) owned by Player 9 (Gray))
      • Set unitgroup[10] = (Units in (Playable map area) owned by Player 10 (Light Blue))
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in unitgroup[(Integer A)] and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Owner of (Picked unit)) is in (All players matching (((Owner of (Picked unit)) slot status) Equal to Is playing))) Equal to False
                • Then - Actions
                  • Unit - Remove (Picked unit) from the game
                • Else - Actions
      • Custom script: call DestroyGroup(udg_unitgroup[1])
      • Custom script: call DestroyGroup(udg_unitgroup[2])
      • Custom script: call DestroyGroup(udg_unitgroup[3])
      • Custom script: call DestroyGroup(udg_unitgroup[4])
      • Custom script: call DestroyGroup(udg_unitgroup[5])
      • Custom script: call DestroyGroup(udg_unitgroup[6])
      • Custom script: call DestroyGroup(udg_unitgroup[7])
      • Custom script: call DestroyGroup(udg_unitgroup[8])
      • Custom script: call DestroyGroup(udg_unitgroup[9])
      • Custom script: call DestroyGroup(udg_unitgroup[10])
 
Level 15
Joined
Aug 11, 2009
Messages
1,606
Here is the trigger i use...

  • RemoveLosers
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Group = (Units in (Playable map area))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Owner of (Picked unit)) slot status) Not equal to Is playing
            • Then - Actions
              • Unit - Remove (Picked unit) from the game
            • Else - Actions
      • Custom script: call DestroyGroup (udg_Temp_Group)
 
Level 5
Joined
May 3, 2009
Messages
129
well why do you have the event (every 1 sec) i dont get what you are trying to do unless a player leaves or at the start you want to remove the units that spawn at the start or a spec unit dies and you want to remove all the players units after
other than them i dont know why you would run that trigger

the trigger i made works on bnet or not
 
Level 15
Joined
Aug 11, 2009
Messages
1,606
well why do you have the event (every 1 sec) i dont get what you are trying to do unless a player leaves or at the start you want to remove the units that spawn at the start or a spec unit dies and you want to remove all the players units after
other than them i dont know why you would run that trigger

the trigger i made works on bnet or not

Well i create a villager for every player and then someone "killer" has to kill them.If they die(they have 3 lives) they are supposed to be defeated.So i defeat them and in order not to confuse the killer i want their units removed from game.Thus,i check every 1 sec,if their status is playing,if it is not i remove their units.

Am i clear?
 
Level 14
Joined
Mar 4, 2009
Messages
1,156
Well i create a villager for every player and then someone "killer" has to kill them.If they die(they have 3 lives) they are supposed to be defeated.So i defeat them and in order not to confuse the killer i want their units removed from game.Thus,i check every 1 sec,if their status is playing,if it is not i remove their units.

Am i clear?
omg don´t you know for event - player leaves the game ?
 
Level 5
Joined
May 3, 2009
Messages
129
ok so let me get this right you at the start of the game to give each player 3 villages(lives) and if a hero dies then you kill one of the villages ? and if all 3 villages are dead then you play the game defeat for the player ? but ar the start off the game you want to remove all the villages so it doesnt mess up the killer ?
 
Level 15
Joined
Aug 11, 2009
Messages
1,606
ok so let me get this right you at the start of the game to give each player 3 villages(lives) and if a hero dies then you kill one of the villages ? and if all 3 villages are dead then you play the game defeat for the player ? but ar the start off the game you want to remove all the villages so it doesnt mess up the killer ?

I remove the villagers not at the start of the game,but when they lose all of their lives.

So...the killer don't gets confused and and kills leaver players.
 
Level 15
Joined
Aug 11, 2009
Messages
1,606
Status
Not open for further replies.
Top