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

derp script help

broken avatar :(
Created 12 years ago
by daedra descent
0 Members and 1 Guest are viewing this topic.
1,533 views
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
The script i made isn't working for whatever reason and i know its being called because the hintstring is working, but when i go to flip the switch, nothing happens.

Code Snippet
Plaintext
power_switch_doubletap()
{
doubletap_trig = getent("power_switch_doubletap", "targetname");
doubletap_cost = 2000;
doubletap_trig sethintstring("Press & hold &&1 to turn Doubletap on [cost: 1000]");

while(1)
{
doubletap_trig waittill( "trigger", who );
{
if( is_player_valid( who ) )
{
if( who.score >= doubletap_cost )
{
// level notify("juggernog_on");
// level notify("sleight_on");
level notify("doubletap_on");
// level notify( "Pack_A_Punch_on" );
// level notify( "revive_on" );
level thread revive_switch_init();
doubletap_trig delete();
who maps\_zombiemode_score::minus_to_player_score( doubletap_cost );
}
}
}
}
}
doubletap_switch_init()
{
sub_switch_doubletap = getent("doubletap_lever","targetname");
sub_switch_doubletap notsolid();

sub_switch_doubletap rotateroll(-90,.3);
sub_switch_doubletap playsound("switch_flip");
playfx(level._effect["switch_sparks"] ,getstruct("doubletap_fx","targetname").origin);
}

I think it has something to do with the while(1) loop, but my quick revive version has the same loop, and it works so IDK.
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 30 March 2013
Last active: 12 years ago
Posts
24
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Coder
Signature
PROxFTW
×
blackbird431's Groups
blackbird431's Contact & Social LinksPROxFTWiso4lif3PROxFTWJTAGxHACKER
Try switching
level thread revive_switch_init();
to
level thread doubletap_switch_init();

 
Loading ...