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

Juggernaut Powerup

broken avatar :(
Created 10 years ago
by sevengpluke
0 Members and 1 Guest are viewing this topic.
1,316 views
broken avatar :(
×
broken avatar :(
Location: usLuketown
Date Registered: 8 June 2013
Last active: 3 months ago
Posts
293
Respect
Forum Rank
Mr. Elemental
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
Personal Quote
Welcome to Luketown
×
sevengpluke's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Oil Rig Beta Access
Oil Rig Beta Access
sevengpluke's Contact & Social Linksdalukesevengplukesevengplukesevengplukesevengpluke
I've used the code from the tutorial section and made a few changes to it. My question is how do I add into the script for a player to have a specific weapon and this specific weapon only until powerup wears off then it switches player back to weapons before grabbing the powerup. Also I was trying to add an HUD similar to double points and insta kill to show at bottom when you have powerup, it shows but it disappears in a split second. How to fix?


Thanks.

Code Snippet
Plaintext
unlimited_ammo_powerup( drop_item, player_won )
{
level notify ("powerup unlimited ammo");
level endon ("powerup unlimited ammo");
wait ( 1 );
PlaySoundAtPosition("juggernaut_vox", (0, 0, 0));
self iPrintLnBold("^4Juggernaut");
self EnableInvulnerability();
setsaveddvar ( "player_sustainammo",  1 );
level.powerup_hud[0].x = 0;
level.powerup_hud[0] setshader("specialty_longersprint", 32, 32);
level.powerup_hud[1].alpha = 0;
level.powerup_hud[0].alpha = 1;

wait ( 30 );

self iPrintLnBold("^7No More Juggernaut");
self DisableInvulnerability();
setsaveddvar ( "player_sustainammo", 0 );
}
Marked as best answer by sevengpluke 10 years ago
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
1 Ok so first you want to store what weapon is currently at hand in a variable

2 Next you want to give the new weapon ( add_weapon("WEAPON"); )

3 You wanna force switch the player TO that weapon ( set_switch_weapon("WEAPON"); )

4 Lock weapon changing and interactions to stop them from switching it out and lock purchasing other weapons to force replace it (I forget the command for this, use script reference or look at other code)

5 set a delay (In your case 30 seconds i assume) ( wait(30); )

6 after the delay, switch the weapon back using the variable (set_switch_weapon ("WEAPON REFERENCE IN VARIABLE"); )

7 remove the temporary weapon again ( again i forget, but possible something like remove_weapon("WEAPON"); )


Now to go into more detail youll need to allow for funny behaviours (You might have noticed the infinate ammo bug from rats v2)

You need to check if a player is downed and handle it accordingly

You may have to handle for things like, holding grenade, player dropping out, reviving etc



The shader thing i have no idea, im not experienced enough with these elements yet


I havent listed all the necessary commands as I cant remember them all off hand. But you'll find them in other code, the UGX script reference or prob in that same tutorial section



^^ If anything about this is wrong one of the others will come along and put it right before long ;)

 
Loading ...