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

trigger wont activate :(

broken avatar :(
Created 11 years ago
by Deleted User
0 Members and 1 Guest are viewing this topic.
1,612 views
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
So im scripting Fizz and got it 100% working apart from my fizz_grab() wont notify that the player has grabbed the perk, i know its this cause i have it print what player its looking for in that function so it is getting called also its not the endon's cause if it was the bottle on my fizz would be deleted and it would reset which it dont it just sits and waits for input

anyways heres my code if you want to check it out

Spoiler: click to open...
Code Snippet
Plaintext
fizz_grab(owner, perk)
{
self endon("fizz_timedout");
self endon("fizz_player_bought_perk");
self endon("fizz_player_downed");
self endon("fizz_player_perk_limit_ran_out");

IPrintLn("looking for " + owner.playername);

for(;;)
{
IPrintLn("chsdjfsiuhfajd");

self waittill("trigger", player);

IPrintLn("chsdjfsiuhfajd");

if(!IsDefined(player))
{
IPrintLn("activated but player is undefined");
continue;
}

IPrintLn("found " + player.playername);

if(player == owner)
{
self notify("fizz_grabbed");
break;
}
}

self thread fizz_give_perk(owner, perk);
}
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 10 years ago
Posts
2,789
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
Signature
Let's keep this thread on topic from here on in. -DBZ

+1 to off-topic reply -DBZ

lmao. Too funny.

Goliath Script Placer: http://ugx-mods.com/forum/index.php/topic,11234.msg125257/topicseen.html#new

"...Christ, people. Learn C, instead of just stringing random characters
together until it compiles (with warnings)..."

-Linus Torvalds
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
What is self and is it defined?

Edit: defined = exist in the map.
Last Edit: October 13, 2015, 07:27:30 pm by daedra descent
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
What is self and is it defined?

Edit: defined = exist in the map.
self is the trigger (<trigger> thread fizz_grab(<player>, <perk>)

anyways it was the endons some how, i just changed it to endon on a reset notify sent after the player grabs, it times out, etc and it works now there must be a limit to the amount of endons you can have
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
If you show the function that is threading this function, and the part where you are waiting for the notify, I think this will get answered quicker. As well as the prints, which I assume if you say it is working, it would be something like:

Code Snippet
Plaintext
looking for playername
chsdjfsiuhfajd

//trigger

chsdjfsiuhfajd
found playername


i would add a print after the notify, and before the break to make sure that is running, but is seems as if it is, and dd's suspicion about self is the answer.

Edit, k, nevermind, while writing this you selected your answer.  :P
Last Edit: October 13, 2015, 07:41:42 pm by MakeCents
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
If you show the function that is threading this function, and the part where you are waiting for the notify, I think this will get answered quicker. As well as the prints, which I assume if you say it is working, it would be something like:

Code Snippet
Plaintext
looking for playername
chsdjfsiuhfajd

//trigger

chsdjfsiuhfajd
found playername


i would add a print after the notify, and before the break to make sure that is running, but is seems as if it is, and dd's suspicion about self is the answer.

Edit, k, nevermind, while writing this you selected your answer.  :P
yeah for somereas it was ending right after the second print (before the waittill) but as i said i fixed it now

 
Loading ...