UGX-Mods

Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: ItsLowrider5 on November 16, 2016, 01:17:01 am

Title: How do I add Stamina-Up to my map?
Post by: ItsLowrider5 on November 16, 2016, 01:17:01 am
I have the sounds and model for the machine, and the perk bottle I could care less for and will probably reuse Double tap's, but how would I script Stamina-up into my map? I know there's a variable you can change in the console to give unlimited sprint, and Extreme Conditioning from MP, but idk how to script that so could someone lend some help? It would be very much appreciated and thank you in advance to anyone that helps.
Title: Re: How do I add Stamina-Up to my map?
Post by: death_reaper0 on November 16, 2016, 09:31:16 am
I have the sounds and model for the machine, and the perk bottle I could care less for and will probably reuse Double tap's, but how would I script Stamina-up into my map? I know there's a variable you can change in the console to give unlimited sprint, and Extreme Conditioning from MP, but idk how to script that so could someone lend some help? It would be very much appreciated and thank you in advance to anyone that helps.

id recommend harrys perks, or even jai's ones, but if you want your own heres my script for it, pretty sure it wasnt mine originally but no idea where it came from (probably a script placer)

Code Snippet
Plaintext

staminup()
{
players = GetPlayers();
while(1)
{
for(i=0;i<players.size;i++)
{
if(players[i] hasperk("specialty_longersprint"))
{
players[i] setmovespeedscale(1.07);
players[i] SetClientDVar("perk_sprintMultiplier", "2");
}
else
{
players[i] setmovespeedscale(1);
players[i] SetClientDVar("perk_sprintMultiplier", "1");
}
}
wait(0.1);
}
}

this doubles sprint distance and 7% speed boost (stats of bo1 staminup, not sure if bo2-3 uses the same)
Title: Re: How do I add Stamina-Up to my map?
Post by: EmpGeneral on November 16, 2016, 02:36:39 pm
May I suggest you to use Harry's perks or the Sniperbolt's prefabs(that include staminup,deadshot and PHD Flopper).But you can use  death_reaper() script of course if you want

Double Post Merge: November 17, 2016, 12:23:48 am
May I suggest you to use Harry's perks or the bamskater's prefabs(that include staminup,deadshot and PHD Flopper).But you can use  death_reaper() script of course if you want
Title: Re: How do I add Stamina-Up to my map?
Post by: ItsLowrider5 on November 17, 2016, 01:26:13 am
id recommend harrys perks, or even jai's ones, but if you want your own heres my script for it, pretty sure it wasnt mine originally but no idea where it came from (probably a script placer)

Code Snippet
Plaintext

staminup()
{
players = GetPlayers();
while(1)
{
for(i=0;i<players.size;i++)
{
if(players[i] hasperk("specialty_longersprint"))
{
players[i] setmovespeedscale(1.07);
players[i] SetClientDVar("perk_sprintMultiplier", "2");
}
else
{
players[i] setmovespeedscale(1);
players[i] SetClientDVar("perk_sprintMultiplier", "1");
}
}
wait(0.1);
}
}

this doubles sprint distance and 7% speed boost (stats of bo1 staminup, not sure if bo2-3 uses the same)
what file does this go into
Title: Re: How do I add Stamina-Up to my map?
Post by: death_reaper0 on November 17, 2016, 06:17:34 am
what file does this go into
it'll work anywhere, i'd recommend _zombiemode_perks since that'll have all the other perk scripts in it, just make sure its called somewhere first