Removing leavers/afks Trigger Question

  • Thread starter Thread starter AImentality
  • Start date Start date
A

AImentality

Guest
Is it possible to have a trigger that removes a player if they have been standing in the same place for like 5 minutes or have not issued any commands for 5 minutes?

Also a simpler question I have is what trigger would I use to remove someones units when they leave the game?

Plz answer both, Thanks!!
 
uhmm...would be possible

but im not quite sure how...



by the way...thats not a good idea doing that trigger...wat if they r healing or like choosing between items...its just gonna get ratings down on ur game...trust me:D

second question

Event-Player leaves game
condition-none
action-remove all units from matching player from entire playable map


i think thats it
 
Wouldn't the action be:
remove all units from triggering player from playable map, not matching player?
 
Hope this helps :)

Thsi will only work for one unit, you probally make a better trigger but this is all i came up with.

MeLikeMonkeys
Events
Time - Elapsed game time is 300.00 seconds
Conditions
((Player 1 (Red) controller) Equal to Computer) or ((Player 1 (Red) controller) Equal to None)
Actions
Unit - Remove Player1RedsUnits from the game

and

Player1RedsUnuts
Events
Map initialization
Conditions
Actions
Set Player1RedsUnits = (Random unit from (Units in (Playable map area) owned by Player 1 (Red)))


I'm not sure if the Map initialization Event should be there


Edit: You would probally need to make one of these for eatch player and you could just use a -kick system for the players that just pretend to bo AFK
 
Not 1

Theres 2 Triggers as you can see and "Player1RedsUnits" is a variable........... :P
 
Um it is the answer to the origional posts question 1.
 
that has nothing to do with question1... doesent really do much but remove 1 random unit...

as far as question one goes you could do domething with triggers and regions so that if a units owned by a player is still in that same regions 5 minutes into the game you would remove all of the players units... or kick the player.
 
Make a integer, every second of the game set the integer +1
If the integer reaches 1000 lets say boot the player.

But
Make multiple events for another trigger like
A unit is issued an order with no target
A player selects a unit
A unit aquires an item ect
Then set the integer to 0 for that player.
 
If you mean kick a player if he is inactive for 5 mins even if those 5 mins is after 30 mins of play this will do it:

Required: A timer array variable with size 12.

Triggers:

Code:
    Events
        Unit - A unit Is issued an order targeting an object
        Unit - A unit Is issued an order targeting a point
        Unit - A unit Is issued an order with no target
    Conditions
    Actions
        Countdown Timer - Start AFK_Timer[(Player number of (Owner of (Ordered unit)))] as a One-shot timer that will expire in 300.00 seconds


Code:
    Events
        Time - AFK_Timer[1] expires
    Conditions
    Actions
        Game - Defeat Player 1 (Red) with the message: AFK!


   Events
        Time - AFK_Timer[2] expires
    Conditions
    Actions
        Game - Defeat Player 2 (Blue) with the message: AFK!

Repete for all players
(it there no timer comparission?)


-Edit-
Mine and 56k is equal.
I dont know wich is least laggy. To have 12 timer running or to set 12 varibles +1 each secund.

-Edit again-
When I think about it: 56k's is esier to do, you only need two triggers.
One to add to the varibles and check if each index is over 1000 and then kick the player and one to set the varible to 0.
 
Lots of triggers, lots of timers.
Here's a more compact version:


Code:
PlayerStillHere
    Events
        Unit - A unit Is issued an order targeting an object
        Unit - A unit Is issued an order targeting a point
        Unit - A unit Is issued an order with no target
    Conditions
    Actions
        Set PlayerStillThere[(Player number of (Owner of (Ordered unit)))] = True



GoneToBed
    Events
        Time - Every 300.00 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        PlayerStillThere[(Integer A)] Equal to False
                    Then - Actions
                        Game - Defeat (Player((Integer A))) with the message: Go to bed!
                    Else - Actions
                        Set PlayerStillThere[(Integer A)] = False

With "PlayerStillThere" an array of booleans, of size "number of players" (I assumed 12 here).
 
but that only kicks players every 5 min not after 5 mins of AFK. So you can be afk with a max of 9 min and 59 sec with that trigger.

But I am maybee a perfectionist?

I think 56k's is the best. You dont have to add each sec with that but maybee every 10 sec. Then you can be afk with a max of 5 min and 9 sec.
 
> but that only kicks players every 5 min not after 5 mins of AFK.

Yes. All players are treated equal.

> So you can be afk with a max of 9 min and 59 sec with that trigger.

No. 5 mins at most.

> But I am maybee a perfectionist?

That's not necessarily bad. Or good :)
But, for people that went to bed (or whatever)
does it really matter whether you kick them after precisely 2'39'' or is around 2'40'' Ok too? ;)
 
AceHart said:
No. 5 mins at most.

1. The trigger GoneToBed has just runned so PlayerStillThere[my number] is false

2. After 1 sec I order my SuperMegaUltra hero to blow the enemy into pieces so PlayerStillThere[my number] is set to true by PlayerStillHere.

3. SuperMegaUltra is killed and i left the computer to cry in a corner

4a. 299 sec after (2) GoneToBed checks if PlayerStillThere[my number] is true. It is that and I am still in game, and my corner starts to be wet.

4b. PlayerStillThere[my number] is set to false by GoneToBed.

5. I am still in my corner and cries.

6. 300 sec after (4a-b) GoneTo bed checks if PlayerStillThere[my number] is true and it isnt. I am kicked from game after 599 sec.

7. I have drovned in my corner.

No offense :)


AceHart said:
But, for people that went to bed (or whatever)
does it really matter whether you kick them after precisely 2'39'' or is around 2'40'' Ok too? ;)

You have a point here.
 
my way is the best way:

Code:
Update AFK Timer
    Events
        Unit - A unit Is issued an order targeting an object
        Unit - A unit Is issued an order targeting a point
        Unit - A unit Is issued an order with no target
    Conditions
    Actions
        Countdown Timer - Start AFK_Timer[(Player number of (Owner of (Ordered unit)))] as a One-shot timer that will expire in 300.00 seconds

Code:
Kick AFK
    Events
        Time - AFK_Timer[1] expires
        Time - AFK_Timer[2] expires
        Time - AFK_Timer[3] expires
        Time - AFK_Timer[4] expires
        Time - AFK_Timer[5] expires
        Time - AFK_Timer[6] expires
        Time - AFK_Timer[7] expires
        Time - AFK_Timer[8] expires
        Time - AFK_Timer[9] expires
        Time - AFK_Timer[10] expires
        Time - AFK_Timer[11] expires
        Time - AFK_Timer[12] expires
    Conditions
    Actions
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Remaining time for AFK_Timer[(Integer A)]) Less than or equal to 0.00
                    Then - Actions
                        Unit Group - Pick every unit in (Units owned by (Player((Integer A)))) and do (Unit - Remove (Picked unit) from the game)
                        Game - Defeat (Player((Integer A))) with the message: AFK too long!
                    Else - Actions

AFK_Timer is obviously a timer array, 1 for each player.
 
Code:
Moving
    Events
        Unit - A unit Is issued an order targeting a point
    Conditions
    Actions
        Trigger - Turn off Timed <gen>
Timed
    Events
        Time - Timer expires
    Conditions
    Actions
        -------- Initially off --------
        Unit - Kill No unit
Not moving
    Events
        Unit - A unit Is issued an order with no target
    Conditions
    Actions
        Countdown Timer - Start Timer as a One-shot timer that will expire in 300.00 seconds
        Trigger - Turn on Timed <gen>
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    this is the fix I get from that yeah this is hard to control. disabling bots is pretty much necessary as ai and other bots would push really old threads to the top. reduce weight of view count. disable guest view tracking if you really want to push active threads to the top. a bit of tinkering for a few days with the weights and other settings should get you a decent trending widget box.
  • Ghan Ghan:
    I changed the settings a bit.
  • Ghan Ghan:
    Narrowed it to 7 days for the half-life and set views to 0 weight.
  • The Helper The Helper:
    I dont think Trending would work for this forum it would be better to just have the last 5 posts from anywhere
  • Ghan Ghan:
    Probably will have to give it some time to update.
  • Ghan Ghan:
    I'm guessing it is not retroactive.
  • Ghan Ghan:
    Next on the punch list: Update the server to Ubuntu 24.04.
  • The Helper The Helper:
    Mad Lads is new I see it displays original post date
  • The Helper The Helper:
    as long as it changes it is good - it is good now it updated and its new stuff
  • The Helper The Helper:
    One thing I have noticed and I dont know if it is by design but like 1 out of 3 times I come to the site the Anubis screen just hangs open, if I refresh it will go away but sometimes it hangs
  • Ghan Ghan:
    I've seen that as well.
  • The Helper The Helper:
    Wow - the change in the stats are major. I kind of knew it was all bots but wow, to see the effect. Why the social media sites cant do something like this I have no idea.
  • Ghan Ghan:
    Probably inflates their numbers so they look better to advertisers.
  • The Helper The Helper:
    Yeah google does not filter those bots. I remember when Apex was doing Google ads I saw the same IPs in there as I was seeing here - google is totally tracking all those bots as traffic and most google traffic, at least ours, was all bots
  • The Helper The Helper:
    oh wow, i bet i can post x links now and do the webp pics now giggity
  • The Helper The Helper:
    ahh anubis blocks anyone that has javascript turned off
  • The Helper The Helper:
    Robot: HTTP client library - i love the new robot :)
  • The Helper The Helper:
    New Science News Forum and it starts out with 420 threads :)
  • The Helper The Helper:
    Technical Support forum name changed To Technology News, there is now a Tech, sci/tech and science forums now :)
  • The Helper The Helper:
    Happy Saturday! Hope everyone has a fantastic weekend!
  • Ghan Ghan:
    We are now on Ubuntu 24.04. Had some issues with the style after the OS/PHP upgrade but now resolved.
    +1
  • Ghan Ghan:
    PHP 8.3 now live
    +1
  • The Helper The Helper:
    Weekend went by too fast. Next weekend I am going to try to do a nature thing - buddy of mine lives by the Colorado river and has some kayaks and invited me to do some kayaking from a place he knows to get on the river.
  • Ghan Ghan:
    That sounds like an adventure.
  • The Helper The Helper:
    400 users all online all looking at latest content

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top