Modme Forums
Menu:

Have fx attached to items you pick up

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


ModmeBot:

Thread By: belly3031
If anyone could help that would be great!

I want to know how to have it so when you pick up a certain part for it be connected with fx so it disappears when the item is picked up. (Cause it looks dumb if the fx is still there to indicate its there after its been picked up) Seems simple I think but I'm not sure how to do this.

Basically like the staff parts how they have the glow around them.

Thanks :)


ModmeBot:

Reply By: Abnormal202

belly3031
If anyone could help that would be great! I want to know how to have it so when you pick up a certain part for it be connected with fx so it disappears when the item is picked up. (Cause it looks dumb if the fx is still there to indicate its there after its been picked up) Seems simple I think but I'm not sure how to do this. Basically like the staff parts how they have the glow around them. Thanks :)

Make sure to use PlayFXOnTag. At the beginning of the map or whenever the parts spawn in, spawn in an invisible ent on the origin of the part, and then PlayFxOnTag on that.
fxOrg = util::spawn_model( "tag_origin", part.origin);
PlayFxOnTag( MY_FX, fxOrg, "tag_origin" );
then when the player picks up the part and the part is deleted in script, also delete the invisible ent the FX is being played on.
fxOrg Delete();


ModmeBot:

Reply By: belly3031

Abnormal202
belly3031 If anyone could help that would be great! I want to know how to have it so when you pick up a certain part for it be connected with fx so it disappears when the item is picked up. (Cause it looks dumb if the fx is still there to indicate its there after its been picked up) Seems simple I think but I'm not sure how to do this. Basically like the staff parts how they have the glow around them. Thanks :) Make sure to use PlayFXOnTag. At the beginning of the map or whenever the parts spawn in, spawn in an invisible ent on the origin of the part, and then PlayFxOnTag on that. fxOrg = util::spawn_model( "tag_origin", part.origin); PlayFxOnTag( MY_FX, fxOrg, "tag_origin" ); then when the player picks up the part and the part is deleted in script, also delete the invisible ent the FX is being played on. fxOrg Delete();


Thank you, but I'm not sure where to put the scripts, I suck at scripting and don't know much. I'm trying to do it for harrybo1's weapons staff parts.