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

Two triggers in one

broken avatar :(
Created 7 years ago
by worstgabena
0 Members and 1 Guest are viewing this topic.
1,445 views
broken avatar :(
×
broken avatar :(
Location: usAnywhere but here
Date Registered: 31 October 2016
Last active: 6 years ago
Posts
32
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
worstgabena's Groups
worstgabena's Contact & Social Links
Is there a way to have one trigger that has two different target names. Or maybe have like a "targetname_2" or something as a key that would function like a regular "targetname"
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
Signature
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
You could use the script_noteworthy KVP for example ( and WaW also has script_string, so BO3 prob as well.. )

Code Snippet
Plaintext
targetname             -    vending_trigger
script_noteworthy    -    perk_quickrevive
broken avatar :(
×
broken avatar :(
Location: usAnywhere but here
Date Registered: 31 October 2016
Last active: 6 years ago
Posts
32
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
worstgabena's Groups
worstgabena's Contact & Social Links
Would I get an ent through the same method as a target name?
Code Snippet
Plaintext
trig = getent("name", "script_noteworthy")
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
Yes, you can simply get an ent by it's script_noteworthy. Or get the array of the targetnames and 'filter' them out: (whatever works best for your situation )

Code Snippet
Plaintext
all_triggers = getentarray( "vending_trigger", "targetname" );
for( i=0 ; i<all_triggers.size ; i++ )
{
    if( all_triggers[i].script_noteworthy == "trigger1" )
    {
         // do stuff
    }
    else if( all_triggers[i].script_noteworthy == "trigger2" )
    {
         // do other stuff
    }

    else
    {
          // more stuff
    }
}
Last Edit: April 28, 2017, 04:37:45 pm by BluntStuffy
broken avatar :(
×
broken avatar :(
Location: usAnywhere but here
Date Registered: 31 October 2016
Last active: 6 years ago
Posts
32
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
worstgabena's Groups
worstgabena's Contact & Social Links
Cool, thanks :)

 
Loading ...