UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

how do i make a trigger activable only if all players are touching another trigg

broken avatar :(
Created 10 years ago
by pashan
0 Members and 1 Guest are viewing this topic.
2,173 views
broken avatar :(
×
broken avatar :(
UM Member, Mapper and 3d Modeler
Location: ca
Date Registered: 8 February 2014
Last active: 3 years ago
Posts
835
Respect
Forum Rank
The Decider
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Port Arthur
Signature
×
pashan's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
how do i make a trigger activable only if all players are touching another trigger?

broken avatar :(
×
broken avatar :(
drago
Location: mx
Date Registered: 5 July 2013
Last active: 4 years ago
Posts
941
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
jjbradman's Groups
jjbradman's Contact & Social Linksjjbradmanjjbradmanjjbradman
just make a while loop that turns on the trigger if a player is touching another multiple_trigger and else make it play the "no_cha_ching" sound lol
Marked as best answer by pashan 10 years ago
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 30 July 2013
Last active: 3 weeks ago
Posts
517
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
Ege115's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Ege115's Contact & Social LinksEge115
Something like this?
Code Snippet
Plaintext
players = GetPlayers();
all_players_in = false;
while(!all_players_in)
{
    players_in = 0;
    for(i = 0;i<players.size;i++)
    {
          if(players[i] isTouching(triggerEntity)
          {
                players_in++;
          }
    }
    if(players_in == players.size)
    {
          all_players_in = true;
    }
    wait(1);
}
Last Edit: April 17, 2014, 03:10:01 pm by Ege115
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Something like this?
Code Snippet
Plaintext
players = GetPlayers();
all_players_in = false;
players_in = 0;
while(!all_players_in)
{
    for(i = 0;i<players.size;i++)
    {
          if(players[i] isTouching(triggerEntity)
          {
                players_in++;
          }
    }
    if(players_in == players.size)
    {
          all_players_in = true;
    }
    wait(1);
}

You may need to move the
Code Snippet
Plaintext
players_in = 0;
before the for loop inside the while loop so that it doesn't do it when the same player walks in so many times...
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 30 July 2013
Last active: 3 weeks ago
Posts
517
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
Ege115's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Ege115's Contact & Social LinksEge115
You may need to move the
Code Snippet
Plaintext
players_in = 0;
before the for loop inside the while loop so that it doesn't do it when the same player walks in so many times...
Script updated
broken avatar :(
×
broken avatar :(
drago
Location: mx
Date Registered: 5 July 2013
Last active: 4 years ago
Posts
941
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
jjbradman's Groups
jjbradman's Contact & Social Linksjjbradmanjjbradmanjjbradman
Script updated
hehe ege you learn so fast :')

 
Loading ...