I have a situation where it wont remove a unit

Status
Not open for further replies.
Level 4
Joined
Apr 7, 2009
Messages
108
i thought of a neat short way of how to remove some certain units from the game(this case being Tier 0) if a player is not here
  • Not Here
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Also for events i've tried, Time Elapsed is 0.00 --------
      • -------- Below means it picks every player not here --------
      • Player Group - Pick every player in (All players matching (((Matching player) slot status) Not equal to Is playing)) and do (Actions)
        • Loop - Actions
          • -------- Means it picks all Tier 0s of the picked player --------
          • Unit Group - Pick every unit in (Units owned by (Picked player) of type Tier 0) and do (Actions)
            • Loop - Actions
              • -------- And this removes picked units from the game --------
              • Unit - Remove (Picked unit) from the game
now my question is when i play it doesn't remove the Tier 0's from the game. i have test mapped and that makes only Player 2 a computer so all the others should remove, but they dont!:confused:
so my question to you is why do they not remove from game
 
Level 4
Joined
Apr 7, 2009
Messages
108
i went the long route.....
  • Not Here
    • Events
      • Map initialization
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) slot status) Equal to Is unused
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 10.00 of (Player 1 (Red) start location)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 2 (Blue) slot status) Equal to Is unused
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 10.00 of (Player 2 (Blue) start location)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 3 (Teal) slot status) Equal to Is unused
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 10.00 of (Player 3 (Teal) start location)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 4 (Purple) slot status) Equal to Is unused
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 10.00 of (Player 4 (Purple) start location)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 5 (Yellow) slot status) Equal to Is unused
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 10.00 of (Player 5 (Yellow) start location)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 6 (Orange) slot status) Equal to Is unused
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 10.00 of (Player 6 (Orange) start location)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 7 (Green) slot status) Equal to Is unused
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 10.00 of (Player 7 (Green) start location)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 8 (Pink) slot status) Equal to Is unused
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 10.00 of (Player 8 (Pink) start location)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 9 (Gray) slot status) Equal to Is unused
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 10.00 of (Player 9 (Gray) start location)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 10 (Light Blue) slot status) Equal to Is unused
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 10.00 of (Player 10 (Light Blue) start location)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 11 (Dark Green) slot status) Equal to Is unused
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 10.00 of (Player 11 (Dark Green) start location)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 12 (Brown) slot status) Equal to Is unused
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 10.00 of (Player 12 (Brown) start location)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
        • Else - Actions
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
i went the long route.....
  • Not Here
    • Events
      • Map initialization
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) slot status) Equal to Is unused
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 10.00 of (Player 1 (Red) start location)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 2 (Blue) slot status) Equal to Is unused
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 10.00 of (Player 2 (Blue) start location)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 3 (Teal) slot status) Equal to Is unused
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 10.00 of (Player 3 (Teal) start location)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 4 (Purple) slot status) Equal to Is unused
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 10.00 of (Player 4 (Purple) start location)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 5 (Yellow) slot status) Equal to Is unused
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 10.00 of (Player 5 (Yellow) start location)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 6 (Orange) slot status) Equal to Is unused
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 10.00 of (Player 6 (Orange) start location)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 7 (Green) slot status) Equal to Is unused
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 10.00 of (Player 7 (Green) start location)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 8 (Pink) slot status) Equal to Is unused
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 10.00 of (Player 8 (Pink) start location)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 9 (Gray) slot status) Equal to Is unused
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 10.00 of (Player 9 (Gray) start location)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 10 (Light Blue) slot status) Equal to Is unused
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 10.00 of (Player 10 (Light Blue) start location)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 11 (Dark Green) slot status) Equal to Is unused
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 10.00 of (Player 11 (Dark Green) start location)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 12 (Brown) slot status) Equal to Is unused
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 10.00 of (Player 12 (Brown) start location)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
        • Else - Actions

What happened to the loop?
If you really want to do it this way, at least use a simple Integer A loop :eek:
 
Level 4
Joined
Apr 7, 2009
Messages
108
no need to reply, i have this figured out. on another post on multiboards i figured how to save 3-5 hours of my time, bad part is i already did long route O.O
 
Level 4
Joined
Apr 7, 2009
Messages
108
now i gotta make a defeat condition w/o actually defeating the player.
if you place defeat condition you have 2 choices, continue or quit, if u click either then your kicked(or defeated). so im tryimng to make a dialog but cant seem to get it down right:sad:
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
now i gotta make a defeat condition w/o actually defeating the player.
if you place defeat condition you have 2 choices, continue or quit, if u click either then your kicked(or defeated). so im tryimng to make a dialog but cant seem to get it down right:sad:

A defeat condition isn't called a "defeat condition" when nobody is defeated :wink:
(I hope you understand that logic =/ )

So, you want to make a dialog when a certain event is triggered (a base is destroyed, a hero is dead, or whatever).
Then you have 2 options... continue and quit game, am I correct?

In that case, what's the problem? Can't you make the dialogue, or do you have problems with the buttons, or when the dialogue should be triggered...
 
Level 4
Joined
Apr 7, 2009
Messages
108
see following trigger then ill explain problem(forgot to explain earlier XD)
  • Defeat Test
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Dying unit)) Equal to Tier 0
          • (Unit-type of (Dying unit)) Equal to Human Tier 1
          • (Unit-type of (Dying unit)) Equal to Human Tier 2
          • (Unit-type of (Dying unit)) Equal to Human Tier 3
          • (Unit-type of (Dying unit)) Equal to Human Tier 4
          • (Unit-type of (Dying unit)) Equal to Human Tier 5
          • (Unit-type of (Dying unit)) Equal to Human Tier 6
          • (Unit-type of (Dying unit)) Equal to Orc Tier 1
          • (Unit-type of (Dying unit)) Equal to Orc Tier 2
          • (Unit-type of (Dying unit)) Equal to Orc Tier 3
          • (Unit-type of (Dying unit)) Equal to Orc Tier 4
          • (Unit-type of (Dying unit)) Equal to Orc Tier 5
          • (Unit-type of (Dying unit)) Equal to Orc Tier 6
        • Then - Actions
          • -------- When a unit dies and it equals one of the above --------
          • -------- then pick all units owned by that player who owned dying tier --------
          • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit))) and do (Actions)
            • Loop - Actions
              • -------- and kill all of his units --------
              • Unit - Kill (Picked unit)
          • -------- Creating a dialog saying "You, Bob, are defeated."(example is bob) --------
          • Dialog - Change the title of DialogDefeat to (You + ((Name of (Owner of (Dying unit))) + , are defeated.))
          • -------- and have 2 options, leave or continue --------
          • Dialog - Create a dialog button for DialogDefeat labelled Leave
          • Set DialogBtnLeave = (Last created dialog Button)
          • Dialog - Create a dialog button for DialogDefeat labelled Continue
          • Set DialogBtnContinue = (Last created dialog Button)
          • -------- then show dialog for owner of dying tier --------
          • Dialog - Show DialogDefeat for (Owner of (Dying unit))
          • -------- i got other triggers for buttons being clicked --------
        • Else - Actions
problem is that when the tier dies, not even first action goes, no units die, in this case, of me, i suicide with my own units and all my units should die, nothing happens, and no dialog pops up. i have the conditions in place and stuff.(i guess world editor hates me:sad:)
 
Level 4
Joined
Apr 7, 2009
Messages
108
LOL FOUND IT, DANNNGGGG i need a Or statment, i got if all those happen at same time :happy:
  • Defeat Test
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Dying unit)) Equal to Tier 0
              • (Unit-type of (Dying unit)) Equal to Human Tier 1
              • (Unit-type of (Dying unit)) Equal to Human Tier 2
              • (Unit-type of (Dying unit)) Equal to Human Tier 3
              • (Unit-type of (Dying unit)) Equal to Human Tier 4
              • (Unit-type of (Dying unit)) Equal to Human Tier 5
              • (Unit-type of (Dying unit)) Equal to Human Tier 6
              • (Unit-type of (Dying unit)) Equal to Orc Tier 1
              • (Unit-type of (Dying unit)) Equal to Orc Tier 2
              • (Unit-type of (Dying unit)) Equal to Orc Tier 3
              • (Unit-type of (Dying unit)) Equal to Orc Tier 4
              • (Unit-type of (Dying unit)) Equal to Orc Tier 5
              • (Unit-type of (Dying unit)) Equal to Orc Tier 6
        • Then - Actions
          • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit))) and do (Actions)
            • Loop - Actions
              • Unit - Kill (Picked unit)
          • Dialog - Change the title of DialogDefeat to (You + ((Name of (Owner of (Dying unit))) + , are defeated.))
          • Dialog - Create a dialog button for DialogDefeat labelled Leave
          • Set DialogBtnLeave = (Last created dialog Button)
          • Dialog - Create a dialog button for DialogDefeat labelled Continue
          • Set DialogBtnContinue = (Last created dialog Button)
          • Dialog - Show DialogDefeat for (Owner of (Dying unit))
        • Else - Actions
YAY!!!!!!!k now i gotta make all my units.....
 
Level 4
Joined
Apr 7, 2009
Messages
108
ill show you....
  • LeaveContinue
    • Events
      • Dialog - A dialog button is clicked for DialogDefeat
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to DialogBtnLeave
        • Then - Actions
          • -------- If you hit leave you are defeated with "You, (Name), are defeated. --------
          • Game - Defeat (Triggering player) with the message: Good-bye and come b...
        • Else - Actions
          • -------- But if you hit Continue --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to DialogBtnContinue
            • Then - Actions
              • -------- You then see entire map --------
              • Visibility - Create an initially Enabled visibility modifier for (Triggering player) emitting Visibility across (Entire map)
              • -------- You are allied to everyone --------
              • Player Group - Pick every player in (All players) and do (Actions)
                • Loop - Actions
                  • Player - Make (Triggering player) treat (Picked player) as an Ally with shared vision
              • -------- And you have no gold to trade to anyone(no wood in game) --------
              • Player - Set (Triggering player) Current gold to 0
            • Else - Actions
 
Level 4
Joined
Apr 7, 2009
Messages
108
now i have a spawn problem too.....
  • Spawn Militia
    • Events
      • Time - Every 8.00 seconds of game time
    • Conditions
    • Actions
      • -------- Pick all players in game --------
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • -------- Keep -> Militia --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Region centered at ((Picked player) start location) with size (384.00, 384.00)) contains (Random unit from (Units owned by (Picked player) of type Tier 0))) Equal to True
            • Then - Actions
              • -------- if you have Tier 0 at your start locations(i place Tier 0 at start location) --------
              • -------- then create 1 militia every 8 seconds --------
              • Unit - Create 1 Militia for (Picked player) at ((Picked player) start location) facing Default building facing degrees
            • Else - Actions
              • -------- if you dont then do nothing --------
              • Do nothing
then units spawn accordingly, BUT when my tier 0 dies or i move on to higher tier i still get militia spawned....
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Try removing the Tier building after you click "continue", since it will take 30 seconds for the building to actually be removed if destroyed (decay time).
If that doesn't help, create a unit group before the if/then/else that picks every alive unit of type of Tier 0 and then pick every units in that unit group and do your if/then/else-thingy ^^
 
Level 4
Joined
Apr 7, 2009
Messages
108
actually yea ur right, i couldnt triple post(rules) but yea i tested it out and when tier dies 4 spawn then they stop cominn, and if i upgrd the next tier spawns.... thatll be it(i hope) time to check out count timer tutorial i found
 
Level 4
Joined
Apr 7, 2009
Messages
108
it is!?!?!?!?!?!? (look at Multiboard Counter( it is in main tutorials at top of screen quick link))
i helped people alot, i made this almost never ending action that i broke down to to do it
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
it is!?!?!?!?!?!? (look at Multiboard Counter( it is in main tutorials at top of screen quick link))
i helped people alot, i made this almost never ending action that i broke down to to do it

Yeah, it is :eek: (talking about the rule, right?)
Comments are crappy, because you can't set a lot of text in them :p you need a lot of those, like in your trigger ^^
 
Status
Not open for further replies.
Top