HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Help with afk or disconnected players, in game...

09-08-2003, 07:33 PM#1
HarlequinKnight
I am making an RPG which is very team oriented, but can also be done in single player. Only thing is, some sequences will require all the players that are currently playing, and I want any players that have disconnected to be deleted (no multiple heroes, or controlling an afk persons hero)

Is there a way to do this? In a couple of maps I have seen, that when a player drops or quits, he is displayed as being so.

I'm hoping that it is perhas a trigger or something, but hve failed to find it... I dunno why. Ithought I knew almost every tirgger in the damned WE!

Plz help! :(
09-08-2003, 07:58 PM#2
Zachary_Shadow
There is a trigger called something like:

Player - Is playing

Or

Player - Is disconnected

Use thoes to determin what players are left.
Set it to check every 5 seconds
Use if/then/else to delete them, kill them or whatever.

I'll see if I can make one quick, gonna open my editor :)
09-08-2003, 08:01 PM#3
Zachary_Shadow
Took me 5 seconds :P

Here it is:

Untitled Trigger 001
Events
Time - Every 5.00 seconds of game time
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 playing
Then - Actions
Do nothing
Else - Actions
Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Actions)
Loop - Actions
Unit - Kill (Picked unit)
09-08-2003, 08:56 PM#4
Nemesis1234
Yours has 2 flaws... Well, 2 that I noticed off the bat.

1) It only checks player 1.
2) The units don't explode, exploding units are much better.

Code:
Detect Players Status
    Events
        Time - Every 5.00 seconds of game time
    Conditions
    Actions
        Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked player) slot status) Equal to Has left the game
                    Then - Actions
                        Unit Group - Pick every unit in (Units owned by (Picked player)) and do (Actions)
                            Loop - Actions
                                Unit - Explode (Picked unit)
                    Else - Actions
09-08-2003, 09:07 PM#5
HarlequinKnight
Ohhhh.....sh!t..... I see it now. Thanks a bunch for putting up with my tiredness...

Thx! :foot:
09-08-2003, 09:13 PM#6
Zachary_Shadow
ROFL, Nemesis

As I said, it was only 5 seconds...

I figured that if I hinted how to do it, he could figure out the rest himself.

But the pick player is better

Explode...geez :P lol