[Unsloved Problem] - Destorying buildings for people not playing.

turok255

New Member
Reaction score
30
I've been trying and trying and trying... I even posted this on here a long time ago... How do you remove buildings for people not playing?
This is what I tried...
Code:
Remove Buildings
    Events
        Time - Elapsed game time is 0.01 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) Not equal to Is playing
                    Then - Actions
                        Unit Group - Pick every unit in (Units owned by (Matching player)) and do (Actions)
                            Loop - Actions
                                Unit - Remove (Picked unit) from the game
                    Else - Actions

But nothing happens...
 
Z

Zell

Guest
Change Matching Player to Picked Player. Matching only refers to things matching a condition, of which you have none. And that leaks.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> Units owned by (Matching player)

You have no matching player.
There is a Picked player though.

However, "all players" doesn't have any players that aren't playing to begin with...


For each Integer A from 1 to 12
If Player slot of Player(Integer A) ...
 

esb

Because none of us are as cruel as all of us.
Reaction score
329
Because of Time - Elapsed game time is 0.01 seconds. So this trigger only happens once. (You are trying to remove buildings when a player leaves too right?)

Also, i THINK that since you picked all players, and you put "((Picked player) slot status) Not equal to Is playing" that means that ALL players must not be playing in order to be removed...i think i'm not sure though
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
Unit Group - Pick every unit in (Units owned by (Matching player)) and do (Actions)
(Units owned by(Picked Player))

Edit: whoa.....
3 posts so fast......
 

turok255

New Member
Reaction score
30
Changed matcxhing to picked... still isn't doing anything

EDIT:Woot ty soo much Ace, It worked :D
 

Knocksious

Sweet, I got 2 little green bars!
Reaction score
46
hmmm weird

don't see anything technically wrong, but maybe, just maybe:
change (player (start status)) not equal to (is playing), to (player (start status)) equal to (not playing)

Also, maybe kill the offending units, as opposed to removing them
 

turok255

New Member
Reaction score
30
If you have the choice you should always remove form the game instead of killing... killing causes lagg when killing mass units...
 

Knocksious

Sweet, I got 2 little green bars!
Reaction score
46
yea, you'd think that, but really, I'm at a loss here
[edit]: something makes me think it isn't possible, just because in souls of the bleach, at startup, the unused "base" buildings are removed one-by-one, and it looks like they aren't getting removed at the same time, this makes me think that there has to be a wait function in there somewhere.

You may just have to run a check against every single player, and see if they are playing or not playing
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top