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

need good scripter help D;

broken avatar :(
Created 10 years ago
by jjbradman
0 Members and 1 Guest are viewing this topic.
1,861 views
broken avatar :(
×
broken avatar :(
drago
Location: mx
Date Registered: 5 July 2013
Last active: 4 years ago
Posts
942
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
jjbradman's Groups
jjbradman's Contact & Social Linksjjbradmanjjbradmanjjbradman
i have one problem with my electric cherry script. the script worls fine and dont do its effect until you have buyed the perk but once buyed if you die and get revived you still keep getting the effect on the perk as if you would still have it.
heres the code if somebody can help me :'(
Code Snippet
Plaintext
#include common_scripts\utility; 
#include maps\_utility;
#include maps\_zombiemode_utility;

init()
{
thread cherry_init();
}

cherry_init()
{
for( ;; )
{
level waittill( "connecting", player );
player thread wait_for_weapon_reload();
}

}


wait_for_weapon_reload()
{
self endon( "disconnect" );

self waittill( "spawned_player" );

for( ;; )
{
self waittill( "reload_start" );
if(self HasPerk( "specialty_fireproof" ))
{
self playlocalsound("mx_flash");
PlayFxOnTag( level._effect["dog_gib"], self, "tag_origin" );

level thread _Cherry_kill(self.origin);

}
    }
}

_Cherry_kill(pos)
{
target = getAiSpeciesArray("axis", "all");
 for(i=0;i<target.size;i++)
 {
  if(distance(pos, target[i].origin) < 150)
  //  if(!target.godtocherry)
  {
  //if(target[i] isfine())
  //{
  target[i] thread zombie_death_bolt();
  //}
  }
 }
}

zombie_death_bolt()
{
if(!self.has_legs)
  return;
 self thread bolt_death_fx();
 playSoundAtPosition("mx_shock", self.origin);
}

bolt_death_fx()
{
self thread maps\dlc3_code::zombie_elec_death( randomint(100) );
PlayFxOnTag( level._effect["dog_gib"], self, "tag_origin" );
}
Last Edit: April 18, 2014, 08:58:41 pm by jjbradman
Marked as best answer by jjbradman 10 years ago
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 22 January 2014
Last active: 3 years ago
Posts
143
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
nabaro's Groups
nabaro's Contact & Social Linkschelseafan122099nabarogamerblast11
add this function to the script:

Code Snippet
Plaintext
lose_cherry()
{
self waittill_any( "fake_death", "death", "player_downed" );

self UnsetPerk( "specialty_fireproof" );
}

be sure to thread it somewhere in your script where appropriate!

Post Merge: April 18, 2014, 08:05:56 pm
Oh, one more thing: you also need to delete the shader, so add this line to the function:

Code Snippet
Plaintext
self cherry_shader destroy();

Replace cherry_shader with the name of your shader.
Last Edit: April 18, 2014, 08:05:56 pm by nabaro
broken avatar :(
×
broken avatar :(
drago
Location: mx
Date Registered: 5 July 2013
Last active: 4 years ago
Posts
942
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
jjbradman's Groups
jjbradman's Contact & Social Linksjjbradmanjjbradmanjjbradman
the shader was getting destroyed anyways but the black ops perks didnt had that unset perk function ._. what a fail, i thought it was my code which was causing problems. ok so now its official i have fully working electric cherry and vulture aid :'D!
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 4 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Signature
Donate to me if you enjoy my work. https://www.paypal.me/thezombiekilla6
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social LinksMrZ0mbiesFanaticdust103194MrZ0mbiesFanatic
the shader was getting destroyed anyways but the black ops perks didnt had that unset perk function ._. what a fail, i thought it was my code which was causing problems. ok so now its official i have fully working electric cherry and vulture aid :'D!

I am so jealous! Wish i was that good at scripting
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 30 July 2013
Last active: 12 days ago
Posts
517
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
Ege115's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Ege115's Contact & Social LinksEge115
You make my electric cherry script to look so nooby compared to yours. D:
broken avatar :(
×
broken avatar :(
drago
Location: mx
Date Registered: 5 July 2013
Last active: 4 years ago
Posts
942
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
jjbradman's Groups
jjbradman's Contact & Social Linksjjbradmanjjbradmanjjbradman
lol everybody please stahp (/u\)

 
Loading ...