Modme Forums

Proper way to play FX on structs

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


xReaction:

Alright so I've got a teleport system that I'm working on and it's going really well, but my next step to make it perfect is doing the FX properly. Currently I've got this piece of code that doesn't work. no FX show up. If someone could tell me the "proper" way to spawn delete and do what I want with FX that'd be great.



The teleporter trigger is linked to the struct in the middle



Any help would really be appreciated :)


func_vehicle:

Since you appear to be doing this in GSC, you need to change

self.portal_fx SetModel( "script_origin" );
to
self.portal_fx SetModel( "tag_origin" );
. To stop the FX, just delete the model, ie.
self.portal_fx Delete();
.

If you want better control over FX, you'll need to do them in CSC (normally via clientfields).

EDIT 2: You should actually use
PlayFXOnTag( PORTAL_LOOP_FX, self.portal_fx, "tag_origin" );
instead of the last line.


xReaction:

Since you appear to be doing this in GSC, you need to change
self.portal_fx SetModel( "script_origin" );
to
self.portal_fx SetModel( "tag_origin" );
. To stop the FX, just delete the model, ie.
self.portal_fx Delete();
.

If you want better control over FX, you'll need to do them in CSC (normally via clientfields).

EDIT 2: You should actually use
PlayFXOnTag( PORTAL_LOOP_FX, self.portal_fx, "tag_origin" );
instead of the last line.

Thank you, I’ve since changed it about a bit because originally I did use playfxontag but it didn’t work because I forgot to put my precached fx in my zone (duh), but it works perfectly now. Appreciate the reply :)