Modme Forums

Moving an FX

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


ModmeBot:

Thread By: Symbo
I tried many things to move an fx. Here is a script where spawn an fx and a model, try to link them and then move them but the model moves alone:

```
function move_fx()
{
level flag::wait_till( "initial_blackscreen_passed" );
struct1 = struct::get("struct1","targetname");
level.model = spawn( "script_model", struct1.origin );
level.model SetModel( "p7_skulls_bones_head_02" );
level._effect["bouledefeu"] = "Symbo/test3";
PlayLoopedFX(level._effect["bouledefeu"], 1, struct1.origin);
level.model enablelinkto();
level._effect["bouledefeu"] linkto(level.model);
fx_trigger = GetEnt("fx_trigger", "targetname");
fx_trigger waittill("trigger", player);
level.model moveY(-338,2);
}
```


ModmeBot:

Reply By: mathfag

PlayFXOnTag(<fx name="">,<entity>,<tag>,[ignore pause])
</tag></entity></fx>


ModmeBot:

Reply By: Symbo
I tried that but I don't understand the tag thing. Here is an exemple that doesn't work:
function move_fx()
{
level flag::wait_till( "initial_blackscreen_passed" );
struct1 = struct::get("struct1","targetname");
fx = spawn("script_model", struct1.origin);
fx setModel("tag_origin");
playFxOnTag("Symbo/test3",fx,"tag_origin");
fx_trigger = GetEnt("fx_trigger", "targetname");
fx_trigger waittill("trigger", player);
fx moveY(-338,2);
}



EDIT: Ok it is solved, I had to change the element of the fx to effectnow.