BurkiOlmi Posted February 14 Share Posted February 14 (edited) Hi, I want to start a ParticleFx as looped, but it only works as non looped. Heres my Code : Quote public void OnTick(object sender,EventArgs e) { if (Game.IsKeyPressed(Keys.ShiftKey)) { int bone = Function.Call<int>(Hash.GET_ENTITY_BONE_INDEX_BY_NAME, Game.Player.Character.CurrentVehicle, "bonnet"); Vector3 pos = Function.Call<Vector3>(Hash.GET_WORLD_POSITION_OF_ENTITY_BONE, Game.Player.Character.CurrentVehicle, bone); Vector3 offset = Function.Call<Vector3>(Hash.GET_OFFSET_FROM_ENTITY_GIVEN_WORLD_COORDS, Game.Player.Character.CurrentVehicle, pos.X, pos.Y, pos.Z); Function.Call(Hash.REQUEST_NAMED_PTFX_ASSET, "core"); if (Function.Call<bool>(Hash.HAS_NAMED_PTFX_ASSET_LOADED, "core")) { Function.Call(Hash.USE_PARTICLE_FX_ASSET, "core"); } Function.Call<int>(Hash.START_PARTICLE_FX_LOOPED_ON_ENTITY, "ent_sht_steam", Game.Player.Character.CurrentVehicle, offset.X + 0.5, offset.Y + 0.05, offset.Z, 40.0, 20.0, 0.0, 0.5, false, false, false); } } Edited March 1 by BurkiOlmi Solved Link to comment Share on other sites More sharing options...
ED9M Posted February 15 Share Posted February 15 There are different types of particle effects. Many do not work in any mode. Some work only as looped, others work as non-looped. I don't know how it can be changed. Link to comment Share on other sites More sharing options...
BurkiOlmi Posted March 1 Author Share Posted March 1 On 2/15/2022 at 5:30 PM, ED9M said: There are different types of particle effects. Many do not work in any mode. Some work only as looped, others work as non-looped. I don't know how it can be changed. No the cause was that I had to add a code to stop them, because if not the game automatically stops the particlefx. Thanks anyway Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now