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

perk icon lightning (like bo3 giant)

HOT
broken avatar :(
Created 8 years ago
by death_reaper0
0 Members and 1 Guest are viewing this topic.
10,387 views
broken avatar :(
×
broken avatar :(
Location: aupotato
Date Registered: 27 September 2013
Last active: 3 years ago
Posts
588
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
respect the dead

donates greatly appreciated :) paypal.me/F3ARxReaper666
discord server:
https://discord.gg/tsGHW99
×
death_reaper0's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
this will play an animated lightning like effect on your perk icons after buying them. this may need to be adjusted if you changed the location the icons show up at

video:
https://youtu.be/zmO-hiy_gEc

image:

note: the lightning bolt is animated ingame

download for images:
mega: https://mega.nz/#!iAxkgSLA!UAznagJxwz9pB80Z5ifGD6g8Bj6IXJ72DAhpaMv8E9s
mediafire: http://www.mediafire.com/download/j4kaao6ovzaeank/bo3_lightning_perk.zip

first open up your maps _zombiemode.gsc and at the very bottom place this:
Code Snippet
Plaintext
electro_perk_start()
{
players = get_players();
for( i = 0; i < players.size; i++ )
{
players[i] thread electro_perk();
}
}

electro_perk()//plays hud fx on buying a perk (bo3 style)
{
while (1)
{
if ( !IsDefined( self.perk_hud ) )
{
self.perk_hud = [];
}

self.perv = self.perk_hud.size;
wait .1;
self.perv2 = self.perk_hud.size;
if (self.perv2  > self.perv )
self thread lightning_zap();
}
}

lightning_zap()
{
self endon( "disconnect" );
self endon("death");

wait 0.05;
hud = create_simple_hud( self );
hud.foreground = true;
hud.sort = 1;
hud.hidewheninmenu = false;
hud.alignX = "left";
hud.alignY = "bottom";
hud.horzAlign = "left";
hud.vertAlign = "bottom";
hud.x = self.perk_hud.size * 30 - 30;
hud.y = hud.y - 70;
hud.alpha = 1;
wait .1;
while (hud.alpha > 0){
for(i=1;i<4;i++){
hud SetShader( "electro"+i, 24, 24 );
wait .1;
}
hud.alpha -= 0.25;
}
hud destroy_hud();
}

then near the top under:
Code Snippet
Plaintext
init_flags();

place:
Code Snippet
Plaintext
	PrecacheShader( "electro1" );
PrecacheShader( "electro2" );
PrecacheShader( "electro3" );
PrecacheShader( "electro4" );

then under :
Code Snippet
Plaintext
	level thread players_playing();

place:
Code Snippet
Plaintext
	level thread electro_perk_start();

your now done with that file, save and close it

now if you already havent done so, move the contains of the file (the one from the link at the top) to where they need to be and add this to your mod.csv:
Code Snippet
Plaintext
material,electro1
material,electro2
material,electro3
material,electro4

that should be it, have fun and credit if used

note: i have not tested to work with harrybo21's perks, however it should be fine (tell me if not and i'll make a version for that :nyan:)
Last Edit: January 14, 2016, 04:32:19 pm by death_reaper0
broken avatar :(
×
broken avatar :(
Location: de
Date Registered: 18 October 2013
Last active: 3 weeks ago
Posts
652
Respect
Forum Rank
Zombie Enslaver
Primary Group
Donator ♥
My Groups
More
×
InFInIX's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Oil Rig Beta Access
Oil Rig Beta Access
InFInIX's Contact & Social Links
Could you upload a pic would like to see what it looks like ^^
broken avatar :(
×
broken avatar :(
Location: aupotato
Date Registered: 27 September 2013
Last active: 3 years ago
Posts
588
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
death_reaper0's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Could you upload a pic would like to see what it looks like ^^
theres a video, i thought an image wouldnt really work since it needs to be animated, i can still do that though
broken avatar :(
×
broken avatar :(
OnionmanVere Bo21
Location: ieu dnt wnt 2 no
Date Registered: 27 September 2013
Last active: 1 year ago
Posts
1,864
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Mapper
My Groups
More
Personal Quote
ok
Signature
Aye mate you don't know me so y don't you shut tf up ok buddy :)

×
Scobalula's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Box Mappers Elite
Box Mappers Elite
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Scobalula's Contact & Social Links
theres a video, i thought an image wouldnt really work since it needs to be animated, i can still do that though

Could do a GIF, Gyazo has this ability.

Looks really nice though. :)
broken avatar :(
×
broken avatar :(
Location: usNebraska
Date Registered: 2 January 2016
Last active: 1 year ago
Posts
113
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Custom Map Reviewer
My Groups
More
My Contact & Social Links
More
Signature
"Wourder"
                   - Brad Leone
×
XEcW22's Groups
Custom Map Reviewer Has permission to post map review topics in the Custom Map Reviews section of the forum.
XEcW22's Contact & Social LinksPapa bolsa de culoXEcW22
Nice Man ;), cool little feature to add
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 30 December 2012
Last active: 9 months ago
Posts
577
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
My preferred name is "xSanchez78".
Check me out here: www.steamcommunity.com/id/xSanchez78
×
alaurenc9'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.
alaurenc9's Contact & Social LinksxSanchez78xSanchez78xSanchez78xSanchez78xSanchez78xSanchez78
Dude how come in every script I see from you, you define the temporary variables on the player? Like self.perv and self.perv2, why define that on the player? Maybe someone else uses those variable names. Just take the "self." Off. Same with the hud. Just define it zap_hud or something but why did you define it on the player? And why did you make an array for it when it's only one hud with one key?
broken avatar :(
×
broken avatar :(
OnionmanVere Bo21
Location: ieu dnt wnt 2 no
Date Registered: 27 September 2013
Last active: 1 year ago
Posts
1,864
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Mapper
My Groups
More
Personal Quote
ok
×
Scobalula's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Box Mappers Elite
Box Mappers Elite
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Scobalula's Contact & Social Links
Dude how come in every script I see from you, you define the temporary variables on the player? Like self.perv and self.perv2, why define that on the player? Maybe someone else uses those variable names. Just take the "self." Off. Same with the hud. Just define it zap_hud or something but why did you define it on the player? And why did you make an array for it when it's only one hud with one key?

Calm down, lol, if he made mistakes you don't have to be a dick about it. He appears to be doing a good job at learning and I commend him on helping the community while he is, if you want help him better to do it without "I know it all and you should too" attitude. :)
broken avatar :(
  • steviewonder87
  • Deleted Member
×
broken avatar :(
steviewonder87
This user is deleted :(
This is interesting, I've never seen 'animated' hud elements before, this could be used for lots of things +1.
broken avatar :(
×
broken avatar :(
Location: esmurcia
Date Registered: 6 July 2014
Last active: 4 years ago
Posts
24
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
isrevivingyou's Groups
isrevivingyou's Contact & Social Links
awesome  :o
broken avatar :(
×
broken avatar :(
Location: aupotato
Date Registered: 27 September 2013
Last active: 3 years ago
Posts
588
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
death_reaper0's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Dude how come in every script I see from you, you define the temporary variables on the player? Like self.perv and self.perv2, why define that on the player? Maybe someone else uses those variable names. Just take the "self." Off. Same with the hud. Just define it zap_hud or something but why did you define it on the player? And why did you make an array for it when it's only one hud with one key?
i'm constantly finding out about new scripting stuff, so theres quite a few gaps in my knowledge about this stuff, i learned the basics of hud elements (besides just adding new ones, like perk icons) only just over a week ago, of which i've taught myself from looking at treyarch's scripts (which is where i usually learn from)
Last Edit: January 14, 2016, 05:41:02 am by death_reaper0
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 30 December 2012
Last active: 9 months ago
Posts
577
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
alaurenc9'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.
alaurenc9's Contact & Social LinksxSanchez78xSanchez78xSanchez78xSanchez78xSanchez78xSanchez78
I'm not trying to be a dick or anything, I am just saying if there is a variable that only is defined that one time in that one function, you do not need to define it on something else. And if you are going to define something on a player, make it something more specific than "perv". And the only reason I point it out is because you did not used to do it before.
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
This is interesting, I've never seen 'animated' hud elements before, this could be used for lots of things +1.
can be done pretty easily but the trade off is we need to use a material per "frame" for it. so will destroy your material count if you did it a lot. This is ok, only 5 extra materials

I was going to do this for vultures stink but was too lazy


as for the argument, it really makes no difference, so no idea why your arguing about it...

Yes it "could" be used by someone else, but likely not, and would take like 1 minute to identify anyway...

there is no "right way", its all preference ( so long as he is remembering to clear the variables )

If he wanted he could just "prefix" then there will never be a mixup. ie self.dr_variable1 =
Last Edit: January 14, 2016, 11:27:40 pm by Harry Bo21
broken avatar :(
×
broken avatar :(
Location: aupotato
Date Registered: 27 September 2013
Last active: 3 years ago
Posts
588
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
death_reaper0's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
yeah, animation (at least this way) isnt hard, its just you cant use it too much cause theres a hud limit and a Precache limit (ive hit this limits at least three times in my wip as it is)
also this does only use one hud spot but you dont have to add much to hit the limit,i think with the stock hud you can add up to around 15-18 things and perk icons take up those spots
Last Edit: January 15, 2016, 06:55:01 am by death_reaper0
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
×
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
yeah, animation (at least this way) isnt hard, its just you cant use it too much cause theres a hud limit and a Precache limit (ive hit this limits at least three times in my wip as it is)
also this does only use one hud spot but you dont have to add much to hit the limit,i think with the stock hud you can add up to around 15-18 things and perk icons take up those spots
are you sure this isnt going to appear for "everyone"?

Should be using a "client" hud element? Unless create_simple_hud( PERSON ) does that, but im not sure it does asi went through this with hintstrings once

Also i didnt know there was a precache limit, what error did it give?
broken avatar :(
×
broken avatar :(
Location: aupotato
Date Registered: 27 September 2013
Last active: 3 years ago
Posts
588
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
death_reaper0's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
are you sure this isnt going to appear for "everyone"?

Should be using a "client" hud element? Unless create_simple_hud( PERSON ) does that, but im not sure it does asi went through this with hintstrings once

Also i didnt know there was a precache limit, what error did it give?
it was defined as self so i think it goes for just the one player, i should check that actually, and i dont remember the erroe but i remember it only showed up in co-op for some reason, i'll check my error log and see if i can still find it, if not i'll uncomment my unused precaches to make it show up again

 
Loading ...