Count Laps Trigger

  • Thread starter Thread starter The_Elder
  • Start date Start date
T

The_Elder

Guest
This is gonna be my 3rd map and i understand the triggers pretty well. I just couldnt figue this one out.

In new map aka Hero Deathmatch. 10 players compete in a race to a teleporter at the top of a maze. The trigger i would like to have will count how many times a player has gone through the teleporter. And then the first one to 8 wins the game. But then theres a twist the last person each round to make it through the teleporter is dropped from the game finally getting it down to 3 people.

This is the first time ive ever had to use forum for help and i hope it will help.

The_Elder
 
Is this "teleporter" triggered or automatic (waygate)?


An integer array, of size 10.
Every time a teleporter is used:
Set Laps[Player number of (Owner of (Triggering unit))] = Laps[Player number of (Owner of (Triggering unit))] + 1
IF Laps[Player ...] equal to 8 THEN victory.

To find the "last player", hm...
Have some integer set to the number of players.
Count the times a teleporter is used (reset this variable to 0 each round).
IF count = number of players THEN you were the last one.

Depends a bit on the precise details of your map.
 
The Teleporter is a regioned waygate. It teleports your character back to your starting point hope that helps.
 
i have a position trigger in my map that sets each player to a position in the multiboard based on their points, the basic trigger is this:
Code:
Set Position
    Events
        (your event here)
    Conditions
    Actions
        Set PlayersPlaying = (Number of players in (All players matching (((Matching player) slot status) Equal to Is playing)))
        For each (Integer A) from 1 to PlayersPlaying, do (Actions)
            Loop - Actions
                Set Position[(Integer A)] = PlayersPlaying
                For each (Integer B) from 1 to PlayersPlaying, do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Player((Integer A))) Not equal to (Player((Integer B)))
                                (point type variable array)[(Integer A)] Greater than (point type variable array)[(Integer B)]
                            Then - Actions
                                Set Position[(Integer A)] = (Position[(Integer A)] - 1)
                            Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)

^ That sets the position

                            If - Conditions
                                Position[(Integer A)] Equal to PlayersPlaying
                            Then - Actions
                                (action that happens to last player)
                            Else - Actions

^That does something for whoever is in last place
i hope this helps, and note that if you use this trigger too often it will lag severly since its running 2 layers of loop at the same time.
 
Cool trigger and i may use but not really what im looking for. once i get this last trigger i can finally call the game done after 4 weeks of hard work. But once again looking for a Lap counter for my map. (Read above statement)
 
oh i see what you mean, i read it wrong. have a trigger like this
Code:
Lap Eliminiation
    Events
        Unit - A unit enters Region 000 <gen>
    Conditions
    Actions
        Set MadeIt[(Player number of (Owner of (Entering unit)))] = True
        Set PlayersThrough = (PlayersThrough + 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                PlayersThrough Equal to ((Number of players in (All players matching (((Matching player) slot status) Equal to Is playing))) - 1)
            Then - 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
                                MadeIt[(Integer A)] Equal to False
                            Then - Actions
                                Game - Defeat (Player((Integer A))) with the message: Defeat!
                            Else - Actions
                        Set MadeIt[(Integer A)] = False
                Set PlayersThrough = 0
            Else - Actions
that will defeat the player who doesnt make it through when everyone else has, feel free to change it to fit your map.
 
Thanks that will work i think.
For the Varibles what are they set to, Intenger, boolean ect and arrays?
 
well which did you not find? i may have used a weu trigger (oops!) but i dont think i did.
 
Im having trouble with this one line its under If Conditions. I cant get it to match what you have given me. And just to make sure the varibles are MadeIt= Boolean Array(10) and PlayersThrough=Intenger?
 
yes the MadeIt variable is an array sized 10 (or however many players your map can have) that is boolean and is set to true when the player makes it. the playersthrough is an integer, and is set one higher each time a player makes it through. once the amount of players is only 1 more than the amount of playersthrough, it will run the trigger. hope that helps
 
Still having problems with one line of trigger. The only line in the Category If Conditions. I cant get that one. Can you guide me through it?
 
It needs to be an integer comparison. Select the variable for the left side, then select "Number of players in player group matching condition". For the player group, select "All players", and for the condition, select "Player Slot Status Comparision". Then for player, select "Matching player", and for the slot status, select "Is playing".
 
That gets me there but then im left with this
PlayersThrough Equal to (Number of players in (All players matching (((Matching player) slot status) Equal to Is playing)))

and im missing that -1 at the end (See agentpaper post)
 
Ah, sorry about that. Didn't see it. Edited it.

It needs to be an integer comparison. Select the variable for the left side. For the right side, selecet arithmetic. Choose subtraction for the operation, and 1 for the right value. For the left value, select "Number of players in player group matching condition". For the player group, select "All players", and for the condition, select "Player Slot Status Comparision". Then for player, select "Matching player", and for the slot status, select "Is playing".
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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 The Helper:
    I wonder how all these bots that sit on the lastest content page get passed anubis or maybe they did not but they are just registering on whos online
  • The Helper The Helper:
    showing up on whos online not registration
  • Ghan Ghan:
    The first gate is stopping all the bots that don't execute javascript.
  • Ghan Ghan:
    That's the main thing with Anubis - no Javascript, no site. Typically you can still get the site to load without Javascript.
  • The Helper The Helper:
    I remember the whole javascript thing, question - how many real people disable that?
  • The Helper The Helper:
    Hell I guess I could go back on the stats to know that - we probably capture that and we know the before and after
  • Ghan Ghan:
    Real users can't really disable Javascript anymore these days.
  • Ghan Ghan:
    The internet is broken without it.
  • Ghan Ghan:
    Bot readable, not human usable.
  • The Helper The Helper:
    got it
  • The Helper The Helper:
    Happy Thursday!
  • The Helper The Helper:
    Check out the new Featured Content feature we apparently got with the forum software upgrade! https://www.thehelper.net/featured/

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top