Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (84,805 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

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

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

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

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

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

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

    2. Site Suggestions

thelorizz

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

Recommended Posts

thelorizz

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

Share this post


Link to post
Share on other sites
CamxxCore

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

Share this post


Link to post
Share on other sites
thelorizz

But as I said, they don't work, I don't know why what am I doing wrong

Share this post


Link to post
Share on other sites
sollaholla

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.

Share this post


Link to post
Share on other sites
thelorizz

 

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

Share this post


Link to post
Share on other sites
Aktarus

 

 

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"?

Share this post


Link to post
Share on other sites
sollaholla

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

Share this post


Link to post
Share on other sites
Aktarus

 

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

Share this post


Link to post
Share on other sites
sollaholla

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.

Share this post


Link to post
Share on other sites
Aktarus

 

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:

Share this post


Link to post
Share on other sites
nm710

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.

Share this post


Link to post
Share on other sites
CamxxCore

 

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

Share this post


Link to post
Share on other sites
alexguirre

 

 

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

Share this post


Link to post
Share on other sites
nm710

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 "-->"?

Share this post


Link to post
Share on other sites
CamxxCore

 

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

Share this post


Link to post
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

×

Important Information

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