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

Where do i put the scripts for a custom perk?

broken avatar :(
Created 7 years ago
by AlecKeaneDUB
0 Members and 1 Guest are viewing this topic.
1,516 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 21 September 2014
Last active: 1 year ago
Posts
191
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Let's all just light up a blunt, and make stuff.
×
AlecKeaneDUB's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
I have a custom perk setup within _zombiemode_perks, but where exactly do I thread and script the function for the perk after you buy it? Can't figue it out and have been searching for hours  :-\
broken avatar :(
×
broken avatar :(
Location: deDortmund
Date Registered: 20 December 2015
Last active: 4 months ago
Posts
307
Respect
Forum Rank
Perk Hacker
Primary Group
Community Scripter
My Groups
More
Personal Quote
Payback
Signature
Tears Of The Fallen | Join the project https://discord.gg/8gDNQRj
×
fanmagic's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
fanmagic's Contact & Social LinksTears Of The Fallen
I have a custom perk setup within _zombiemode_perks, but where exactly do I thread and script the function for the perk after you buy it? Can't figue it out and have been searching for hours  :-\
perk_function()
{
while(1)
{
if(self HasPerk("specialty_perk"))
self perk_effect();
else self effect_without_perk();

wait(.1);
}
}
Thread this as a check for all players somewhere under maps\_zombiemode::main(); in your mapname.gsc like this:
players = get_players();
for(i=0;i<players.size;i++)
{
players[i] thread perk_function();
}

Bamskater used this code for his perks. So you only have to change the effect for the player i.e. Stamin-Up:
staminup()
{
while(1)
{
if(self hasperk("specialty_longersprint"))    //rename the perk to yours
self setmovespeedscale(1.3);                     // add an effect
else
self setmovespeedscale(1);                        // reset the effect if the player has not the perk
wait .5;
}
}

 
Loading ...