Modme Forums

Making an FX move with a script_origin (Or any other way)

Game Modding | Call of Duty: Black Ops 3 | Scripting


KevinRomo98:

Hey so I am trying to script an FX to move under a model with a script origin. It does not move or even spawn if it is a script_origin but it will spawn with a script_brushmodel. But it does not move it stands in place while the object moves.

This is the line I am using but I do not think it is right. I think it requires a different function.
PlayFX(level._effect["RocketLaunchFumes"], RocketFX.origin);

Thanks. Let me know if you need more script.


Sleepy216:

Instead of using playfx try this

m_fx = spawn( "script_model", your_script_ent.origin );
m_fx setmodel( "tag_origin" );
m_fx linkto(your_script_ent);
playfxontag( level._effect[ "yourfxnamehere" ], m_fx, "tag_origin" );
I think this should make the fx move with your struct/model. to delete the fx just use m_fx Delete();
You will need to change the your_script_ent & yourfxnamehere first.
example with what you provided
m_fx = spawn( "script_model", rocketfx.origin );
m_fx setmodel( "tag_origin" );
m_fx linkto(rocketfx);
playfxontag( level._effect[ "rocketlaunchfumes " ], m_fx, "tag_origin" );


blink-420:

Instead of using playfx try this
m_fx = spawn( "script_model", your_script_ent.origin );
m_fx setmodel( "tag_origin" );
m_fx linkto(your_script_ent);
playfxontag( level._effect[ "yourfxnamehere" ], m_fx, "tag_origin" );
I think this should make the fx move with your struct/model. to delete the fx just use m_fx Delete();
You will need to change the your_script_ent & yourfxnamehere first.
example with what you provided
m_fx = spawn( "script_model", rocketfx.origin );
m_fx setmodel( "tag_origin" );
m_fx linkto(rocketfx);
playfxontag( level._effect[ "rocketlaunchfumes " ], m_fx, "tag_origin" );

How would you change the Fx angle offset using this script?


Spiki:

How would you change the Fx angle offset using this script?

m_fx setmodel...
m_fx.angles = (0, 90, 0);
m_fx linkto...