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

custom trap not killing zombies in next round

broken avatar :(
Created 12 years ago
by buttkicker845
0 Members and 1 Guest are viewing this topic.
1,449 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 11 March 2014
Last active: 5 years ago
Posts
264
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
Signature
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
×
buttkicker845's Groups
buttkicker845's Contact & Social Links
when the next round starts the newly spawned zombies wont take damage from the trap even if its still activated.
heres my damage method from my code:
Code Snippet
Plaintext
damage(){
damagetrig = getEnt("flooddamage","targetname");
zombies = getaispeciesarray("axis");
players = get_players();
on = self.time/10;
while(1){
for(k=0;k<zombies.size;k++){
if((zombies[k] IsTouching(damagetrig))){
zombies[k] dodamage(zombies[k].health + 666, zombies[k].origin );
}//end if statement
}//end for loop
for(i=0;i<players.size;i++){
if((players[i] IsTouching(damagetrig))){
players[i] dodamage(players[i].health +666, players[i].origin );
}//end if statment
}//end for loop
self.timen = self.time/20;
wait self.timen;
on = self.timen + on;
if(on == self.time){
break;
}//end if statement
}//end while loop
}//end damage method
if someone could help me id be greatly appreciative
Marked as best answer by buttkicker845 12 years ago
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 15 March 2014
Last active: 7 years ago
Posts
214
Respect
Forum Rank
Mr. Elemental
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
WaW Scriptor
Signature
WaW Scriptor
×
PROxFTW's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
PROxFTW's Contact & Social LinksPROxFTWPROxFTWPROxFTWPROxFTW
I've had this happen before. It is something with Zombies = GetAiSpeciesArray( "axis" ); only defining the zombies for the round. So to fix it right above
Code Snippet
Plaintext
for(k=0;k<zombies.size;k++)
add
Code Snippet
Plaintext
zombies = getaispeciesarray("axis");
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 11 March 2014
Last active: 5 years ago
Posts
264
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
×
buttkicker845's Groups
buttkicker845's Contact & Social Links
that fixed it thanks! :)

 
Loading ...