Hello guys i wanna ask you about script for cod2 killing zombies with drone

Do you need help with something ZN related or something to complain about?
Post Reply
bingatra
Posts: 2
Joined: Fri Apr 29, 2016 10:49 am

Hello guys i wanna ask you about script for cod2 killing zombies with drone

Post by bingatra »

this is the code i have problem in trace when i hit the zombies only when the ground and bullet contacts and the zombie around the ground of trace
can someone help to kill zombies when i shoot them directly?
hello mitch can you help me!!

Code: Select all

if(self attackbuttonpressed() && !self.uvgraketa && self.dragonfiretime>=2)
{
earthquake(0.1,0.1, self.origin, 40);
vec=anglestoforward(self.thunder.angles);
firePos = self.thunderposl.origin+ vector_scale(vec, 20);
firePos2 = self.thunderposr.origin+ vector_scale(vec, 20);
self.dragonfiretime=0;


fireForward = firePos + vector_scale(vec, 5000);
fireForward2 = firePos2 + vector_scale(vec, 5000);
playfx(level._effect["20mm_uvg"], self.thunderposl.origin, vectorNormalize(fireForward - firePos ) );
playfx(level._effect["20mm_uvg"], self.thunderposr.origin, vectorNormalize(fireForward2 - firePos2 ) );

self playSound( "uvgshot", self.thunder.origin );
self thread cannonBulletthunder( firePos, vec, fireForward);
self thread cannonBulletthunder( firePos2, vec, fireForward2);
zoms=getentarray("script_model","classname");
trace=bullettrace(self geteye()+(0,0,18),self geteye()+(20000*vec[0],20000*vec[1],20000*vec[2]+18),true,self);
for(i=0;i<zoms.size;i++)
if(isdefined(zoms.id))
{
{
{
if(distance(trace["position"],zoms.origin)<80)
{
earthquake(0.5,1, trace["position"], 80);
zoms FinishPlayerDamage (zoms, self, 50, 0, "MOD_RIFLE_BULLET", "d2_mp",zoms.origin, (0,0,0), "none",0);
{
if(!zoms.boss)
zoms.trig notify("damage",int(level.zommaxhealth/800)+5000,self,true);
else
zoms.trig notify("damage",int(level.zommaxhealth/1600)+5000,self,true);
}
}
}
}
}

}
User avatar
Mitch
Site Admin
Posts: 195
Joined: Sat Mar 02, 2013 10:45 pm

Re: Hello guys i wanna ask you about script for cod2 killing zombies with drone

Post by Mitch »

Hello bingatra,

What is the current result of the code?
And what do you want the code to do?
(if you can't explain it then make screenshots or a video)

I think if i understand your problem correctly it has to do with the bullet trace.
So see: https://znation.nl/cod4script/bullettrace.htm

If you need further help, you could post your problem on killtube.org. It has a few members who are still active (including me).
Image
bingatra
Posts: 2
Joined: Fri Apr 29, 2016 10:49 am

Re: Hello guys i wanna ask you about script for cod2 killing zombies with drone

Post by bingatra »

well it make like the zombies dies only when you shoot the ground they dont die when you hit them only when you shoot their legs how to fix it?


playfxontag(level._effect["20mm_uvg"], self.uvggun, "tag_flash_left");
playfxontag(level._effect["20mm_uvg"], self.uvggun, "tag_flash_right");
playfxontag(level._effect["rifle"], self.uvggun, "tag_flash_right");
playfxontag(level._effect["rifle"], self.uvggun, "tag_flash_left");
zoms=getentarray("script_model","classname");
trace=bullettrace(self geteye()+(0,0,18),self geteye()+(20000*vec[0],20000*vec[1],20000*vec[2]+18),true,self);
for(i=0;i<zoms.size;i++)
if(isdefined(zoms.id))
{
{
{
if(distance(trace["position"],zoms.origin)<80)
{
earthquake(0.5,1, trace["position"], 80);
zoms FinishPlayerDamage (zoms, self, 50, 0, "MOD_RIFLE_BULLET", "d2_mp",zoms.origin, (0,0,0), "none",0);
{
if(!zoms.boss)
zoms.trig notify("damage",int(level.zommaxhealth/800)+5000,self,true);
else
zoms.trig notify("damage",int(level.zommaxhealth/1600)+5000,self,true);
}
}
}
}
}
Post Reply