Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

Happy Holidays from the GTANet team!

[C#] Why a lot of particles don't work?


thelorizz
 Share

Recommended Posts

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 by thelorizz
Link to comment
Share on other sites

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

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

 

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

  • 1 month later...

 

 

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

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

 

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 by Aktarus
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

 

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! :cool:

Thank you

 

ps: I am waiting for you on the other thread. :whistle:

Link to comment
Share on other sites

  • 4 weeks later...

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

 

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

Link to comment
Share on other sites

 

 

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

  • Like 2
Link to comment
Share on other sites

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

 

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 (:

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.