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

Random Amount of Change Found Under Perk Machines

broken avatar :(
Created 7 years ago
by scriptz
0 Members and 1 Guest are viewing this topic.
3,903 views
broken avatar :(
×
broken avatar :(
Location: calondon ontario
Date Registered: 22 December 2013
Last active: 9 months ago
Posts
61
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
×
scriptz's Groups
scriptz's Contact & Social Linksbobby_z_beginB0BBY-Z-B3G1N
Hello, i do apologize i have not uploaded anything for a while , i been busy working on stuff, i am now going through and preparing a lot of finished codes for release, I will be releasing bigger more complex codes soon however i want to get some of the smaller ones uploaded first, This is a simple code i wrote to randomize the amount of points found by player when going prone in front of perk machines , as oppose to always being 25 points.

STEP 1:

open your dlc3_code.gsc (located in mods/mapname/maps/) and search for this function:

           
Code Snippet
Plaintext
check_for_change()

STEP 2:

replace the function with this one (or adjust yours to look like this):

Code Snippet
Plaintext
check_for_change()
{

while (1)
{

self waittill( "trigger", player );

if ( player GetStance() == "prone" )
{

level thread randomize_change_found();
player maps\_zombiemode_score::add_to_player_score( level.random_change_found );
play_sound_at_pos( "purchase", player.origin );
break;

}

}

}
STEP 3:

now paste this function under that function or at the bottom of the script:

Code Snippet
Plaintext
randomize_change_found()
{

level.random_change_found = undefined;
random_change_amount = randomintrange(1,8);
switch(random_change_amount)
{

case 1:
level.random_change_found = 25;
break;

case 2:
level.random_change_found = 50;
break;

case 3:
level.random_change_found = 100;
break;

case 4:
level.random_change_found = 200;
break;

case 5:
level.random_change_found = 250;
break;

case 6:
level.random_change_found = 500;
break;

case 7:
level.random_change_found = 750;
break;

case 8:
level.random_change_found = 1000;
break;

}

}

STEP 4:

save & close, then open launcher (check on dlc3_code.gsc in the list if it's not already) & build your mod.


NOTES:

- if you do not have dlc3_code.gsc in your mods/mapname/maps/ folder then copy it from raw/maps/
- the value of level.random_change_found in each case is one of the possible points player recieves, you may of course          adjust them to your liking.
Last Edit: November 07, 2016, 05:44:03 am by sevengpluke
broken avatar :(
×
broken avatar :(
Location: usLuketown
Date Registered: 8 June 2013
Last active: 3 months ago
Posts
293
Respect
Forum Rank
Mr. Elemental
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
Personal Quote
Welcome to Luketown
×
sevengpluke's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Oil Rig Beta Access
Oil Rig Beta Access
sevengpluke's Contact & Social Linksdalukesevengplukesevengplukesevengplukesevengpluke
Please use the code tags next time. Thanks!
broken avatar :(
×
broken avatar :(
Location: calondon ontario
Date Registered: 22 December 2013
Last active: 9 months ago
Posts
61
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
×
scriptz's Groups
scriptz's Contact & Social Linksbobby_z_beginB0BBY-Z-B3G1N
sorry about that, will do, btw thank for adding them in
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 9 May 2015
Last active: 5 years ago
Posts
103
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Signature
"Mod builder lied. Everything isn't ok."
×
pwman123's Groups
pwman123's Contact & Social Linkspwman123pwman123pwman123
harrybo21 perks completely screwed me over on this but luckily, I figured it out  ;D
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 7 May 2015
Last active: 4 weeks ago
Posts
312
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
Signature
×
EmpGeneral's Groups
EmpGeneral's Contact & Social LinksldraweEletricStorm
harrybo21 perks completely screwed me over on this but luckily, I figured it out  ;D

What did you do??
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 9 May 2015
Last active: 5 years ago
Posts
103
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
pwman123's Groups
pwman123's Contact & Social Linkspwman123pwman123pwman123
What did you do??
I don't remember because I completely wiped out the scripts. I will add this eventually.

 
Loading ...