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

Reward for spending 25k

broken avatar :(
Created 7 years ago
by ColdShrimp2
0 Members and 1 Guest are viewing this topic.
2,286 views
broken avatar :(
×
broken avatar :(
Location: usAustria
Date Registered: 5 August 2016
Last active: 4 years ago
Posts
76
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
ColdShrimp2's Groups
ColdShrimp2's Contact & Social Links
I'm looking for a script that'll give a specialty_ordinance when you spend 25,000 points throughout the game and a sound effect letting you know that the reward has been given. It should be a simple script to help me get into scripting
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: 12 September 2014
Last active: 3 years ago
Posts
103
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
Signature
Dead Palace
×
Riptide1106's Groups
Riptide1106's Contact & Social Links
what do you mean by speciality_ordinance? a perk, or like mortars or monkey bombs?
broken avatar :(
×
broken avatar :(
Location: usAustria
Date Registered: 5 August 2016
Last active: 4 years ago
Posts
76
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
ColdShrimp2's Groups
ColdShrimp2's Contact & Social Links
what do you mean by speciality_ordinance? a perk, or like mortars or monkey bombs?

It's a perk
Marked as best answer by ColdShrimp2 7 years ago
broken avatar :(
×
broken avatar :(
Location: aupotato
Date Registered: 27 September 2013
Last active: 3 years ago
Posts
588
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
respect the dead

donates greatly appreciated :) paypal.me/F3ARxReaper666
discord server:
https://discord.gg/tsGHW99
×
death_reaper0's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
in _zombiemode_score.gsc find
Code Snippet
Plaintext
minus_to_player_score( cost )
and under
Code Snippet
Plaintext
		self set_player_score_hud(); 
place
Code Snippet
Plaintext
		if(!isdefined(self.total_spent))
self.total_spent = 0;
self.total_spent += cost;
if(!isdefined(self.hasreceived))
self.hasreceived = false;
if(self.total_spent >= 25000 && !self.hasreceived)
{
self setperk("speciality_ordinance");
self.hasreceived = true;
}
not tested but this should make you receive the speciality_ordinance, it wont make a perk icon and shouldnt be lost when dead (you didnt specify that)
broken avatar :(
×
broken avatar :(
Location: usAustria
Date Registered: 5 August 2016
Last active: 4 years ago
Posts
76
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
ColdShrimp2's Groups
ColdShrimp2's Contact & Social Links
in _zombiemode_score.gsc find
Code Snippet
Plaintext
minus_to_player_score( cost )
and under
Code Snippet
Plaintext
		self set_player_score_hud(); 
place
Code Snippet
Plaintext
		if(!isdefined(self.total_spent))
self.total_spent = 0;
self.total_spent += cost;
if(!isdefined(self.hasreceived))
self.hasreceived = false;
if(self.total_spent >= 25000 && !self.hasreceived)
{
self setperk("speciality_ordinance");
self.hasreceived = true;
}
not tested but this should make you receive the speciality_ordinance, it wont make a perk icon and shouldnt be lost when dead (you didnt specify that)

Thanks a lot, and how could I add the shader and have it be lost when downed?

Double Post Merge: May 25, 2017, 12:39:06 am
Thanks a lot, and how could I add the shader and have it be lost when downed?

Nevermind, I don't need shaders or it to be lost. I've got a better idea
Last Edit: May 25, 2017, 12:39:06 am by cjgfrosty
broken avatar :(
×
broken avatar :(
Location: aupotato
Date Registered: 27 September 2013
Last active: 3 years ago
Posts
588
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
death_reaper0's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
replace
Code Snippet
Plaintext
self setperk("speciality_ordinance");
with
Code Snippet
Plaintext
self maps\_zombiemode_perks::give_perk( "speciality_ordinance" );
broken avatar :(
×
broken avatar :(
Location: usAustria
Date Registered: 5 August 2016
Last active: 4 years ago
Posts
76
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
ColdShrimp2's Groups
ColdShrimp2's Contact & Social Links
replace
Code Snippet
Plaintext
self setperk("speciality_ordinance");
with
Code Snippet
Plaintext
self maps\_zombiemode_perks::give_perk( "speciality_ordinance" );
I added

playsound("mission_success");
printlnbold("Challenge Completed");
printlnbold("Spent 25000 Points");


underneath the

self setperk("specialty_detectexplosive");
self.hasreceived = true;

and it gives an error. Sorry about the million questions but how do I make a sound and println notifying that you completed the challenge?


Double Post Merge: May 25, 2017, 01:40:32 am
I added

playsound("mission_success");
printlnbold("Challenge Completed");
printlnbold("Spent 25000 Points");


underneath the

self setperk("specialty_detectexplosive");
self.hasreceived = true;

and it gives an error. Sorry about the million questions but how do I make a sound and println notifying that you completed the challenge?

Nevermind part 2, I didn't put self in front of them
Last Edit: May 25, 2017, 01:40:32 am by cjgfrosty

 
Loading ...