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

Adding Perk Help

broken avatar :(
Created 9 years ago
by MZslayer11
0 Members and 1 Guest are viewing this topic.
1,352 views
broken avatar :(
×
broken avatar :(
Location: usUnited States
Date Registered: 7 March 2014
Last active: 8 days ago
Posts
1,191
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Site Moderator
My Groups
More
My Contact & Social Links
More
×
MZslayer11's Groups
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
MZslayer11's Contact & Social LinksMZslayer11Service_Code_30#2655
I'm trying to add staminup into _zombiemode_perks (rather than using bams perks... don't ask why  :kidding: ) and I am in need of a little assistance. I basically used the standard perks as a template for my new perk and I think I have most things set up correctly.... except for one thing. Whenever the power is activated in my map, the perk does not turn on. The model does not shake and light up like the others do and I cannot buy the perk. Not to mention the fact that the string still says "The power must be activated first". The other perks work fine.

I have this...
Code Snippet
Plaintext
level thread turn_staminup_on();
...Under these:
Code Snippet
Plaintext
        level thread turn_jugger_on();
level thread turn_doubletap_on();
level thread turn_sleight_on();
level thread turn_revive_on();

And this is my function:
Code Snippet
Plaintext
turn_staminup_on()
{
machine = getentarray("vending_staminup", "targetname");
level waittill("staminup_on");

for( i = 0; i < machine.size; i++ )
{
machine[i] setmodel("zombie_vending_staminup_on");
machine[i] vibrate((0,-100,0), 0.3, 0.4, 3);
machine[i] playsound("perks_power_on");
machine[i] thread perk_fx( "doubletap_light" );
}
level notify( "specialty_longersprint" );
}

Twards the bottom I have this...
Code Snippet
Plaintext
level thread machine_watcher_factory("staminup_on");
...under these:
Code Snippet
Plaintext
        level thread machine_watcher_factory("juggernog_on");
level thread machine_watcher_factory("sleight_on");
level thread machine_watcher_factory("doubletap_on");
level thread machine_watcher_factory("revive_on");

Don't worry, this is not all the code I copied/edited, just the stuff that pertains to power.

I copied the doubletap prefab, stamped it, and changed it to the correct kvps for staminup and changed the model.

Am I missing something?

Also, there is one kvp that shows up several times in the doubletap prefab and I am unsure what to put. It is "script_string : tap_perk" and I could not find in anywhere in the script. Right now I have it set as "stam_perk" in all instances but I never found if/where it goes in a script and I do not know if this is correct.
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
Signature
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
Code Snippet
Plaintext
level notify( "specialty_longersprint" );

should be

Code Snippet
Plaintext
level notify( "specialty_longersprint_power_on" );



EDIT:

and you also might want to change:
Code Snippet
Plaintext
level waittill("staminup_on");

to something allready there, like:

Code Snippet
Plaintext
level waittill("sleight_on");
Last Edit: March 03, 2015, 10:17:47 pm by BluntStuffy
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 4 years ago
Posts
6,877
Respect
1,004Add +1
Forum Rank
Immortal
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
If you want scripts / features made for you, then contact me by PM or email / skype etc
it will cost you tho so if you have no intention of reciprocating don't even waste my time ;)
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social Links[email protected]HarryBo21HarryBo000
either that or add "staminup on" to DLC3code. Thats where the others are I believe :)

You got the models working? Dont forget youll need to "precache" them like the treyarch ones are done ;)
Last Edit: March 03, 2015, 10:37:16 pm by Harry Bo21
broken avatar :(
×
broken avatar :(
Location: usUnited States
Date Registered: 7 March 2014
Last active: 8 days ago
Posts
1,191
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Site Moderator
My Groups
More
My Contact & Social Links
More
×
MZslayer11's Groups
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
MZslayer11's Contact & Social LinksMZslayer11Service_Code_30#2655
Code Snippet
Plaintext
level notify( "specialty_longersprint" );

should be

Code Snippet
Plaintext
level notify( "specialty_longersprint_power_on" );



EDIT:

and you also might want to change:
Code Snippet
Plaintext
level waittill("staminup_on");

to something allready there, like:

Code Snippet
Plaintext
level waittill("sleight_on");

Thanks! Got it working.

 
Loading ...