Posts: 33
Threads: 17
Joined: Feb 2013
Reputation:
0
04-20-2013, 12:16
(This post was last modified: 04-20-2013, 20:40 by surtek.)
how to resolve this code only for the
(case "deserteagle"
Code: ExplosionWednesday()
{
for(;;)
{
self waittill ( "weapon_fired" );
forward = self getTagOrigin("j_head");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
SPLOSIONlocation = BulletTrace( forward, end, 0, self )[ "position" ];
level.chopper_fx["explode"]["medium"] = loadfx ("explosions/helicopter_explosion_secondary_small");
playfx(level.chopper_fx["explode"]["medium"], SPLOSIONlocation);
RadiusDamage( SPLOSIONlocation, 500, 1000, 500, self );
}
}
vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}
Posts: 33
Threads: 17
Joined: Feb 2013
Reputation:
0
Posts: 3,704
Threads: 147
Joined: Jan 2011
Reputation:
119
04-20-2013, 13:12
(This post was last modified: 04-20-2013, 13:13 by Nekochan.)
(04-20-2013, 12:46)G-Man Wrote: (04-20-2013, 12:41)Pozzuh Wrote: cyka
srsly? and you call me a spammer after it? I at least know the right section for it...
@ Pozzuh is retarded.
Ontopic:
Here you go -
Code: ExplosionWednesday()
{
for(;;)
{
self waittill ( "weapon_fired" );
if(self Getcurrentweapon() == "deserteagle_mp")
{
forward = self getTagOrigin("j_head");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
SPLOSIONlocation = BulletTrace( forward, end, 0, self )[ "position" ];
level.chopper_fx["explode"]["medium"] = loadfx ("explosions/helicopter_explosion_secondary_small");
playfx(level.chopper_fx["explode"]["medium"], SPLOSIONlocation);
RadiusDamage( SPLOSIONlocation, 500, 1000, 500, self );
}
}
}
vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Posts: 33
Threads: 17
Joined: Feb 2013
Reputation:
0
(04-20-2013, 13:12)SailorMoon Wrote: (04-20-2013, 12:46)G-Man Wrote: (04-20-2013, 12:41)Pozzuh Wrote: cyka
srsly? and you call me a spammer after it? I at least know the right section for it...
@Pozzuh is retarded.
Ontopic:
Here you go -
Code: ExplosionWednesday()
{
for(;;)
{
self waittill ( "weapon_fired" );
if(self Getcurrentweapon() == "deserteagle_mp")
{
forward = self getTagOrigin("j_head");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
SPLOSIONlocation = BulletTrace( forward, end, 0, self )[ "position" ];
level.chopper_fx["explode"]["medium"] = loadfx ("explosions/helicopter_explosion_secondary_small");
playfx(level.chopper_fx["explode"]["medium"], SPLOSIONlocation);
RadiusDamage( SPLOSIONlocation, 500, 1000, 500, self );
}
}
}
vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}
thank you!
Posts: 5,135
Threads: 241
Joined: Nov 2010
Reputation:
100
Why do people still make their own "vector_scal" function when there's a perfectly fine vector_scale() in utility.gsc ?
Posts: 3,704
Threads: 147
Joined: Jan 2011
Reputation:
119
04-20-2013, 15:06
(This post was last modified: 04-20-2013, 15:06 by Nekochan.)
(04-20-2013, 14:57)Pozzuh Wrote: Why do people still make their own "vector_scal" function when there's a perfectly fine vector_scale() in utility.gsc ?
They're scared of #include "_utility.gsc";
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
|