Log in to reply
 

[SOLVED] Why not every particle works?



  • Hello guys, I'm wondering why not every particle works, I mean there are a lot of particles but only the 20% can be spawned, just why? Am I doing something wrong? I want to spawn the "ptfx_muzzle_02" from the "core" group but it doesn't work....


  • MODERATOR

    @lorizz12 That fx doesn't seem to exist in any of the asset groups. Check this dump, it is only missing a few fx from the newer DLCs: http://gtaforums.com/topic/867994-particle-asset-dump/



  • @stillhere as I deduced, I tried one and it didn't work, what am I doing wrong!!


  • MODERATOR

    @lorizz12 Some FX need to be looped (Ex: START_PARTICLE_FX_LOOPED_ON_ENTITY), some need to non-looped. Additionally, some Looped effects need to use SET_PARTICLE_FX_LOOPED_EVOLUTION with their own corresponding evolution arguments. This thread has some examples: https://forums.gta5-mods.com/topic/12278/rocket-voltic-ptfx-effect?page=1



  • @stillhere thanks, because I need to do something like this
    0_1501873886864_upload-3b2ae3b7-8e05-4860-a947-72918387a319
    Look at the light trails, I saw someone on GTA San Andreas doing it, he did it pretty good, he said he used a HLSL but I don't know how to do it on GTA V, so I thought about a particle red colored.


  • MODERATOR

    @lorizz12 Oh, you can try this (You will have to adjust some things):
    Asset: core
    Fx name: veh_slipstream
    Evolution argument: slipstream

    int slipstreamLBone = Function.Call<int>(Hash.GET_ENTITY_BONE_INDEX_BY_NAME, veh, "slipstream_l");
    slipstreamLHandle = Function.Call<int>(Hash._START_PARTICLE_FX_LOOPED_ON_ENTITY_BONE, "veh_slipstream", veh, 0.0, 0.0, 0.0, 0.0, 0.0, 180.0, slipstreamLBone, 2.0, true, true, true);
    Function.Call(Hash.SET_PARTICLE_FX_LOOPED_EVOLUTION, slipstreamLHandle, "slipstream", 1.0f, 0);
    Function.Call(Hash.SET_PARTICLE_FX_LOOPED_ALPHA, slipstreamLHandle, 1f);```


  • @stillhere Everything works great, thanks! But now I have a problem, since I need to play with alpha:
    The more nitro you have the stronger the light is, and that's easy to do mathematically, the problem is that normally the effect is not very strong, even at 1f alpha, but I noticed that when I spawn it on the OnTick method, it spawns ton of them overlapping themselves, but it seems that after they spawns I lose the entire control of it and I cannot modify them anymore, nor remove! How can I fix this?


  • MODERATOR

    @lorizz12 For Looped effects, you should assign each effect their own handle to be able to control them. Then when you're done with them you can use REMOVE_PARTICLE_FX or STOP_PARTICLE_FX_LOOPED. I guess REMOVE_PARTICLE_FX_IN_RANGE can do it too.

    As for the strength of the effect, aside from spawning multiple effects and changing the alpha, perhaps you can change the scale of the effect and/or the "slipstream" evolution amount (range is 0f-1f I believe).


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.