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 does it make player the var? trig waittill("trigger", player)

broken avatar :(
Created 10 years ago
by MakeCents
0 Members and 1 Guest are viewing this topic.
3,113 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods 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
I've been wondering this for a couple years now. So now I will ask, how does this work and can I reproduce it? I assume someone will say, its something to do with engine and not something I can do.

Code Snippet
Plaintext

trig waittill("trigger", player);
//player becomes the player that triggered it
self waittill( "damage", amount, attacker, directionVec, point, type );
//All of these vars are ?returned?

Can I make a custom function do this and how?
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 30 December 2012
Last active: 2 years ago
Posts
577
Respect
Forum Rank
Zombie Enslaver
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Signature
My preferred name is "xSanchez78".
Check me out here: www.steamcommunity.com/id/xSanchez78
×
alaurenc9's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
alaurenc9's Contact & Social LinksxSanchez78xSanchez78xSanchez78xSanchez78xSanchez78xSanchez78
waittill is what I call a "special" function. It doesn't act like any normal function, whatever you put in as an argument actually becomes a defined variable. You can do
Code Snippet
Plaintext
ent notify( "string", trigger );
and somewhere else you can do
Code Snippet
Plaintext
ent waittill( "string", trigger );
and 'trigger' will automatically be a defined variable, defined as the trigger you passed on in the 'notify' in the other function. You don't even have to add
Code Snippet
Plaintext
trigger = undefined;
above it. It just works. This has proven super useful to me.
Last Edit: February 23, 2016, 10:43:41 pm by alaurenc9
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods 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
But i can't make a new "special function" can I?

I have a waittill trigger function that doesn't use triggers, that would be great if I could get to work like the normal one.
Marked as best answer by MakeCents 10 years ago
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 30 December 2012
Last active: 2 years ago
Posts
577
Respect
Forum Rank
Zombie Enslaver
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
alaurenc9's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
alaurenc9's Contact & Social LinksxSanchez78xSanchez78xSanchez78xSanchez78xSanchez78xSanchez78
No you cannot make your own. For something like that though, I would recommend using
Code Snippet
Plaintext
struct = SpawnStruct();
to have something to notify on and be saved as the 'trigger' in your system. For those who are unclear, structs do NOT cound towards g_spawn, you cannot even delete them.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods 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
No you cannot make your own. For something like that though, I would recommend using
Code Snippet
Plaintext
struct = SpawnStruct();
to have something to notify on and be saved as the 'trigger' in your system. For those who are unclear, structs do NOT cound towards g_spawn, you cannot even delete them.

Lol, yup, that is one of the methods, but I usually just use the ent itself. Okay, thanks for confirming that I can't reproduce it.

 
Loading ...