UGX-Mods

Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: ItsLowrider5 on August 20, 2017, 04:42:21 am

Title: Pack-a-Punch and free perk powerups?
Post by: ItsLowrider5 on August 20, 2017, 04:42:21 am
I want to have powerups in my map that gives the player a free perk and one that pack-a-punches the currently held weapon. I'm gonna try to make a script for myself if no response is given but i'm not very experienced and i'll probably end up basing it off a pack-a-punch script. any help is appreciated
Title: Re: Pack-a-Punch and free perk powerups?
Post by: BashTheOutcast on August 20, 2017, 04:58:20 am
There are a couple of tuts on UGX and Zombiemodding for perk drop and for the pap drop you could do what others do you go to a map with it and open up the IWD file
Title: Re: Pack-a-Punch and free perk powerups?
Post by: Pieternba2k on August 20, 2017, 06:11:01 am
I want to have powerups in my map that gives the player a free perk and one that pack-a-punches the currently held weapon. I'm gonna try to make a script for myself if no response is given but i'm not very experienced and i'll probably end up basing it off a pack-a-punch script. any help is appreciated

If you add me on discord I can propably help you out 😉
Pieternba2k #9386
Title: Re: Pack-a-Punch and free perk powerups?
Post by: StupidEdits on August 20, 2017, 06:17:47 am
Perks - https://ugx-mods.com/forum/index.php?topic=5796.0

PaP - Keep looking

There are a couple of tuts on UGX and Zombiemodding for perk drop and for the pap drop you could do what others do you go to a map with it and open up the IWD file
Shame on you
Title: Re: Pack-a-Punch and free perk powerups?
Post by: BashTheOutcast on August 20, 2017, 10:51:21 am
Shame on you

Umm no I said other people, I don't do it.
Title: Re: Pack-a-Punch and free perk powerups?
Post by: buttkicker845 on August 21, 2017, 03:12:49 am
the pap perk would be something like this
Code Snippet
Plaintext
pap_powerup()
{
//ensure the player is valid
if(!is_player_valid(self))
{
return;
}
currentWeapon = self GetCurrentWeapon();
//ensure current weapon exists, its not a grenade and that its not already upgraded
if(!isDefined(currentWeapon) || getWeaponType(currentWeapon) == "grenade" || isSubStr(currentWeapon, "upgraded"))
{
return;
}
//make the weapon upgraded
upgradeWeapon +=  "_upgraded";
//take the current weapon and give the upgraded one
self takeWeapon(currentWeapon);
self giveWeapon(upgradeWeapon);
self switchTo(upgradeWeapon);
}