thelorizz Posted August 4, 2017 Share Posted August 4, 2017 (edited) Hello guys, I'm trying to find a particle that resembles the NFS Nitro Bloom Light Effect, but I can't proceed because 80% of the particles don't work. I'm trying with the "ptfx_fire_v2" from the "core" group and that's my code: void EmitsLoopedParticles(Vehicle vehicle) { if (vehicle != null) { int ex1 = Function.Call<int>(Hash.GET_ENTITY_BONE_INDEX_BY_NAME, vehicle, "exhaust"); Vector3 ex1p = Function.Call<Vector3>(Hash.GET_WORLD_POSITION_OF_ENTITY_BONE, vehicle, ex1); float yPitch = Function.Call<float>(Hash.GET_ENTITY_PITCH, vehicle); Function.Call(Hash.REQUEST_NAMED_PTFX_ASSET, "core"); if (Function.Call<bool>(Hash.HAS_NAMED_PTFX_ASSET_LOADED, "core")) { Function.Call(Hash._SET_PTFX_ASSET_NEXT_CALL, "core"); int fireHandle = Function.Call<int>(Hash.START_PARTICLE_FX_LOOPED_AT_COORD, "ptfx_fire_v2", ex1p.X, ex1p.Y, ex1p.Z, yPitch, 0.0f, vehicle.Heading - 90.0f, 50.0f, false, false, false, false); } } } And don't tell me that's a code problem because if I put the "scr_carsteal5_car_muzzle_flash" from the "scr_carsteal4" it works PERFECTLY. Edited August 4, 2017 by thelorizz Link to comment Share on other sites More sharing options...
CamxxCore Posted August 4, 2017 Share Posted August 4, 2017 Use a proper list of particles. For some reason those old lists contain 50% things that aren't actually particles. I've released an entire dump of all the fx but people still want to use those old and incomplete lists for some reason... Look in the documentation section or go here: http://camx.me/gtav/ptxfx/ptfx.txt Link to comment Share on other sites More sharing options...
thelorizz Posted August 4, 2017 Author Share Posted August 4, 2017 But as I said, they don't work, I don't know why what am I doing wrong Link to comment Share on other sites More sharing options...
sollaholla Posted August 4, 2017 Share Posted August 4, 2017 But as I said, they don't work, I don't know why what am I doing wrong He just told you. Use the list that Camxx provided. Link to comment Share on other sites More sharing options...
thelorizz Posted August 5, 2017 Author Share Posted August 5, 2017 But as I said, they don't work, I don't know why what am I doing wrong He just told you. Use the list that Camxx provided. I just discovered that I need to use the LOOPED along with EVOLUTION on some fxs, and NON_LOOPED on others, thanks Link to comment Share on other sites More sharing options...
Aktarus Posted September 22, 2017 Share Posted September 22, 2017 But as I said, they don't work, I don't know why what am I doing wrong He just told you. Use the list that Camxx provided. I just discovered that I need to use the LOOPED along with EVOLUTION on some fxs, and NON_LOOPED on others, thanks What do you mean by "use the LOOPED along with EVOLUTION on some fxs, and NON_LOOPED on others"? Link to comment Share on other sites More sharing options...
sollaholla Posted September 22, 2017 Share Posted September 22, 2017 What do you mean by "use the LOOPED along with EVOLUTION on some fxs, and NON_LOOPED on others"? SET_PARTICLE_FX_LOOPED_EVOLUTION http://www.dev-c.com/nativedb/func/info/5f0c4b5b1c393be2 START_PARTICLE_FX_NON_LOOPED_ON_ENTITY http://www.dev-c.com/nativedb/func/info/0d53a3b8da0809d2 START_PARTICLE_FX_LOOPED_ON_ENTITY http://www.dev-c.com/nativedb/func/info/1ae42c1660fd6517 Link to comment Share on other sites More sharing options...
Aktarus Posted September 22, 2017 Share Posted September 22, 2017 (edited) What do you mean by "use the LOOPED along with EVOLUTION on some fxs, and NON_LOOPED on others"? SET_PARTICLE_FX_LOOPED_EVOLUTION http://www.dev-c.com/nativedb/func/info/5f0c4b5b1c393be2 START_PARTICLE_FX_NON_LOOPED_ON_ENTITY http://www.dev-c.com/nativedb/func/info/0d53a3b8da0809d2 START_PARTICLE_FX_LOOPED_ON_ENTITY http://www.dev-c.com/nativedb/func/info/1ae42c1660fd6517 Yes I saw these functions but I didn't get the difference between them (especially the "evolution" one). And above all, when to use one over another. Edited September 22, 2017 by Aktarus Link to comment Share on other sites More sharing options...
sollaholla Posted September 22, 2017 Share Posted September 22, 2017 Yes I saw these functions but I didn't get the difference between them (especially the "evolution" one). And above all, when to use one over another. Ohhh okay. Well, the evolution one simply sets the "strength" of the particle. For example, on a Jet, the flame increases depending on how much you accelerate. So setting the evolution to 1.0 would make the flame fully extended. Looped-on-entity is for particles you want to loop forever, and it returns a particle handle. Nonlooped is just the opposite of looped, it just plays once. Aktarus 1 Link to comment Share on other sites More sharing options...
Aktarus Posted September 22, 2017 Share Posted September 22, 2017 Yes I saw these functions but I didn't get the difference between them (especially the "evolution" one). And above all, when to use one over another. Ohhh okay. Well, the evolution one simply sets the "strength" of the particle. For example, on a Jet, the flame increases depending on how much you accelerate. So setting the evolution to 1.0 would make the flame fully extended. Looped-on-entity is for particles you want to loop forever, and it returns a particle handle. Nonlooped is just the opposite of looped, it just plays once. That's a perfect and very clear explanation! Thank you ps: I am waiting for you on the other thread. sollaholla 1 Link to comment Share on other sites More sharing options...
NModds Posted October 18, 2017 Share Posted October 18, 2017 Use a proper list of particles. For some reason those old lists contain 50% things that aren't actually particles. I've released an entire dump of all the fx but people still want to use those old and incomplete lists for some reason... Look in the documentation section or go here: http://camx.me/gtav/ptxfx/ptfx.txt I know that all of these are from "core" asset, but how do you find ptfx for other assets? I have relied on the lists others have provided and I tested countless particle effects to find working ones, but I would really love to know how to do it myself. Link to comment Share on other sites More sharing options...
CamxxCore Posted October 19, 2017 Share Posted October 19, 2017 Use a proper list of particles. For some reason those old lists contain 50% things that aren't actually particles. I've released an entire dump of all the fx but people still want to use those old and incomplete lists for some reason... Look in the documentation section or go here: http://camx.me/gtav/ptxfx/ptfx.txt I know that all of these are from "core" asset, but how do you find ptfx for other assets? I have relied on the lists others have provided and I tested countless particle effects to find working ones, but I would really love to know how to do it myself. Well I did make a semi- complete dump of most particles (look in the documentation section). As far as doing it yourself, there isn't really a clean way, so to say. Ideally we would have some kind of YPT viewer or even better, OpenIV support for those files. Personally, I have just been dumping the assets at runtime using some hacky code: https://gist.github.com/CamxxCore/3c81920f4ab30e5659310bd580268aae https://gist.github.com/CamxxCore/38591de5b89088883478f09e82f0c924 NModds 1 Link to comment Share on other sites More sharing options...
alexguirre Posted October 19, 2017 Share Posted October 19, 2017 Well I did make a semi- complete dump of most particles (look in the documentation section). As far as doing it yourself, there isn't really a clean way, so to say. Ideally we would have some kind of YPT viewer or even better, OpenIV support for those files. Personally, I have just been dumping the assets at runtime using some hacky code: https://gist.github.com/CamxxCore/3c81920f4ab30e5659310bd580268aae https://gist.github.com/CamxxCore/38591de5b89088883478f09e82f0c924 You can take some code from CodeWalker to read .ypt files, then you just need to extract all .ypt files with OpenIV and execute your program. That's how I made this dump, it should have all particles as of version v1180: https://gist.github.com/alexguirre/af70f0122957f005a5c12bef2618a786 CamxxCore and NModds 2 Link to comment Share on other sites More sharing options...
NModds Posted October 19, 2017 Share Posted October 19, 2017 Well I did make a semi- complete dump of most particles (look in the documentation section). As far as doing it yourself, there isn't really a clean way, so to say. Ideally we would have some kind of YPT viewer or even better, OpenIV support for those files. Personally, I have just been dumping the assets at runtime using some hacky code: https://gist.github.com/CamxxCore/3c81920f4ab30e5659310bd580268aae https://gist.github.com/CamxxCore/38591de5b89088883478f09e82f0c924 Wow, man you are awesome! Thanks for providing the code as well, but for now I'm happy with the dump you made. Just wanted to know, what are the rules in the files after the "-->"? Link to comment Share on other sites More sharing options...
CamxxCore Posted October 19, 2017 Share Posted October 19, 2017 Well I did make a semi- complete dump of most particles (look in the documentation section). As far as doing it yourself, there isn't really a clean way, so to say. Ideally we would have some kind of YPT viewer or even better, OpenIV support for those files. Personally, I have just been dumping the assets at runtime using some hacky code: https://gist.github.com/CamxxCore/3c81920f4ab30e5659310bd580268aae https://gist.github.com/CamxxCore/38591de5b89088883478f09e82f0c924 Wow, man you are awesome! Thanks for providing the code as well, but for now I'm happy with the dump you made. Just wanted to know, what are the rules in the files after the "-->"? No problem. And they are parameters used to 'evolve' the fx using the SET_PARTICLE_FX_LOOPED_EVOLUTION native. Sometimes you need to set the associated parameters for the particle to be visible at all. Would explain why you couldn't get a lot of them working (: NModds 1 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