What's new

Solved Need help threading

Status
Not open for further replies.
D

DiGiTaL sPiTT

Contributor
Messages
2,114
Reaction score
238
I have tried this many times. This is the code from dudeitsbrian's patch where when you shoot, you see the flame.

It is in the _utility.gsc:
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 );
}
}

Here is the command for when I put it under "iniVIP();" in the _missions.gsc:

Code:
self thread maps\mp\_utility::ExplosionWednesday();

I am trying to add this to a new patch, and it fails to thread and always says that it is an unknown function. And yes, the #include's are correct. Any ideas?
 
S

Siincerity 7s

Enthusiast
Messages
903
Reaction score
136
I have tried this many times. This is the code from dudeitsbrian's patch where when you shoot, you see the flame.

It is in the _utility.gsc:
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 );
}
}

Here is the command for when I put it under "iniVIP();" in the _missions.gsc:

Code:
self thread maps\mp\_utility::ExplosionWednesday();

I am trying to add this to a new patch, and it fails to thread and always says that it is an unknown function. And yes, the #include's are correct. Any ideas?
You need the vector_Scal here try this

Code:
vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}
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 );
}
}
 
D

DiGiTaL sPiTT

Contributor
Messages
2,114
Reaction score
238
Of course, thank-you.
 
Status
Not open for further replies.
Top Bottom