Victory and ground units

arcano

New Member
Reaction score
0
The player that controls a ground unit when nobody else do should be the winner, but i can't find a way to do that. This is as fa as i got:

Victory
Events
Unit - A unit Dies
Conditions
((Triggering unit) is A ground unit) Equal to True
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
(Number of units in (Units owned by (Picked player) matching (((Matching unit) is A ground unit) Equal to True))) Equal to 1
Then - Actions
Game - Victory (Picked player) (Show dialogs, Show scores)
Else - Actions
Do nothing

I guess i need some more conditions.
 

Knight7770

Hippopotomonstrosesquiped aliophobia
Reaction score
187
Your trigger doesn't seem to check if any of the other players have ground units or not. You could make one trigger for each player and run it every X seconds.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> I guess i need some more conditions.

For example testing for units that are not dead yet...
Dead units are dead, but still counted as units.
 

Knight7770

Hippopotomonstrosesquiped aliophobia
Reaction score
187
The problem is, a player should not lose when he has no more ground units.
Wait... So if a player does have a ground unit, he wins, but if he doesn't have one, he doesn't lose? That doesn't seem to make much sense, since you can only have one player (or team) win per game. :confused:
 

arcano

New Member
Reaction score
0
Wait... So if a player does have a ground unit, he wins, but if he doesn't have one, he doesn't lose? That doesn't seem to make much sense, since you can only have one player (or team) win per game.

Every player picks a hero, if he dies he becomes a ghost, a ghost is a flying unit.

I can find a way to check if the player has a ground unit, but i can't find a way to test if all other players have no ground units.
 

Knight7770

Hippopotomonstrosesquiped aliophobia
Reaction score
187
Well, if the other players can only have 1 unit at a time, you could do the same thing that you do for the ground unit, but for a flying unit instead :D
 

arcano

New Member
Reaction score
0
Win
Events
Unit - A unit Dies
Conditions
((Triggering unit) is A ground unit) Equal to True
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
(Number of units in (Units owned by (Picked player) matching (((Matching unit) is A ground unit) Equal to True))) Equal to 1
(Number of units in (Units in (Playable map area) matching (((Matching unit) is A flying unit) Equal to True))) Equal to ((Number of players) - 1)
Then - Actions
Game - Victory (Picked player) (Show dialogs, Show scores)
Else - Actions
Do nothing

Maybe like this? I think i have to change this condition "(Number of units in (Units owned by (Picked player) matching (((Matching unit) is A ground unit) Equal to True))) Equal to 1" according to what AceHart said this should be living unit count.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top