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

Function help | anyone know what this function does

broken avatar :(
Created 11 years ago
by Deleted User
0 Members and 1 Guest are viewing this topic.
1,660 views
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
Well title says it all, anyone know what this function does (it can be found in _zombiemode_perks.gsc)

Code Snippet
Plaintext
electric_perks_dialog()
{
self endon ("warning_dialog");
level endon("switch_flipped");

timer = 0;

while(1)
{
wait .5;

players = get_players();
for(i = 0; i < players.size; i++)
{
dist = DistanceSquared(players[i].origin, self.origin);

if(dist > 70 * 70)
{
timer = 0;
continue;
}

if(dist < 70 * 70 && timer < 3)
{
wait .5;
timer ++;
}

if(dist < 70 * 70 && timer == 3)
{
players[i] thread do_player_vo("vox_start", 5);
wait 3;

self notify("warning_dialog");
IPrintLnBold("warning_given");
}
}
}
}
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
Looks like an old function that warns the player to turn the power on. Probably used in verruckt/Shi No Numa/Some other test map.
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
Looks like an old function that warns the player to turn the power on. Probably used in verruckt/Shi No Numa/Some other test map.

but the strange thing is i can call this function on my perks trigger and on waw perk triggers and nothing happens ?!? any idea why
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
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
but the strange thing is i can call this function on my perks trigger and on waw perk triggers and nothing happens ?!? any idea why

Is there a sound alias vox_start in your map? If not that may be why.

But from the looks of it the code does the following:

-sets timer to 0 as the default value.

-if the player is less than 70 * 70(4900) units away, add one to the timer variable and if the timer variable is less than 3

-if the players is less than 70* 70 and the timer equals 3, play a vox, wait, send out a notify, and print something on the screen.

-if the player is farther away than 70 * 70 units then reset the timer variable to 0.

I see no reason why it wouldn't work, but the logic is a bit redundant.
Last Edit: May 23, 2015, 10:27:21 pm by daedra descent

 
Loading ...