Originally posted by daboss
i bet this is the code you use and just changed the fx runFlameGun()
{
self endon("death");
self endon("disconnect");
self endon("flame_gun_end");
self thread doFXbyMap(getDvar("mapname"));
self setClientDvar("r_brightness", "-.1");
while(1)
{
self waittill("weapon_fired");
startB = GetCursorPos();
startA = self getTagOrigin("tag_weapon_left");
xD = distance(startA, startB);
//We will have to do a limit of range, or else error 'no free dobjs'
owner = self;
if(xD < 855)
{
pointe = roundUp(xD/55);
CX = startA[0] - startB[0];
CY = startA[1] - startB[1];
CZ = startA[2] - startB[2];
XA = CX/pointe;
YA = CY/pointe;
ZA = CZ/pointe;
RadiusDamage( startB, 300, 300, 300, owner );
for(b = pointe; b > -1; b--)
{
playFX(self.ZFX, startB + (((XA, YA, ZA) * b)) );
wait 0.01;
}
}
}
}
roundUp( floatVal )
{
if ( int( floatVal ) != floatVal )
return int( floatVal+1 );
else
return int( floatVal );
}
doFXbyMap(mapz)
{
self.ZFX = level.spawnGlow["enemy"];
switch(mapz)
{
case "mp_checkpoint":
self.ZFX = level._effect[ "firelp_med_pm" ];
break;
case "mp_boneyard":
self.ZFX = level._effect[ "firelp_med_pm_nolight" ];
break;
case "mp_favela":
self.ZFX = level._effect[ "firelp_med_pm" ];
break;
case "mp_invasion":
self.ZFX = level._effect[ "firelp_med_pm" ];
break;
}
}