I played around abit, and spawned the FX on a tag, but it seems it is the FX, it won't change its upward angle
PHP Code:
init()
{
level thread MonitorPlayer();
level._effect[ "dog" ] = loadfx( "fx/dog.efx" );
precacheModel( "xmodel/tag_origin" );
}
MonitorPlayer()
{
while( true )
{
level waittill( "connected" , player );
player thread MonitorButton();
}
}
vs( v , s )
{
return ( v[ 0 ] * s , v[ 1 ] * s , v[ 2 ] * s );
}
MonitorButton()
{
self endon( "disconnect" );
while( isDefined( self ) )
{
if( self UseButtonPressed() )
{
start = self.origin + ( 0 , 0 , 64 );
end = start + vs( AnglesToForward( self getPlayerAngles() ) , 10000 );
trace = BulletTrace( start , end , false , self );
if( !isDefined( trace[ "position" ] ) )
continue;
a = vectorToAngles( trace[ "normal" ] );
up = AnglesToUp( a );
fwd = AnglesToForward( a );
right = AnglesToRight( a );
p = trace[ "position" ] + vs( fwd , 1.1 );
// PlayFx( level._effect[ "dog" ] , p , fwd , up );
thread TagFx( 7.1 , a , p );
while( self UseButtonPressed() )
wait( 0.05 );
}
wait( 0.05 );
}
}
TagFx( delay , a , p )
{
tag = spawn( "script_model", p );
tag setModel( "xmodel/tag_origin" );
tag.origin = p;
tag.angles = a;
wait( 0.05 );
PlayFxOnTag( level._effect[ "dog" ] , tag , "tag_origin" );
// doesnt affect the FX
tag rotatePitch( 360 , 2 );
tag rotateYaw( 360 , 2 );
tag rotateRoll( 360 , 2 );
tag moveZ( 200 , 7 ); // works
wait( delay + 0.05 );
tag delete();
}
I play around with the FX itself in the Editor, but its a pain in the ass to change it (change, move .efx file to iwd, start game...) it takes ages. And in the FX Editor not even all effects are shown (I cannot see the decals..)
![Click image for larger version.
Name: shot0005.jpg
Views: 10
Size: 132.9 KB
ID: 1635](https://killtube.org/attachment.php?s=ffd1eb1f6e0c2627b59baf1968fab8dd&attachmentid=1635&d=1596381941&thumb=1)