[Snippet] Jump dust particle

Results 1 to 7 of 7
  1. #1
    Enthusiast Bombi is offline
    MemberRank
    Jan 2019 Join Date
    D:/ Knox#5391Location
    38Posts

    idea [Snippet] Jump dust particle

    How to spawn particle after jump, we can see this kinda things in popular games.

    this is extremely easy and lazy, it is just a last minute idea, there're too many small things that we can do to improve this game to look better




    AI_Player.CPP
    Look for this
    (waiting for the [code] tag to be fixed...)
    // calculate damage from falling if any
    float newHeight = GetPosition().y;
    if((StartFallingHeight - newHeight) > 15.0f) // more than 15 meters, we gonna break something (increased to 15 meters, as sometimes on downhill we do not detect properly that we are on the ground and don't want to break legacy code)
    {
    float damageAmount = ((StartFallingHeight - newHeight))*2.0f; // if falling more than 50 meters - dies immediatelly (damage >=100)
    damageAmount = R3D_CLAMP(damageAmount, 0.0f, 255.0f);


    // send damage to server
    PKT_C2S_FallingDamage_s n;
    n.damage = (BYTE)damageAmount;
    p2pSendToHost(this, &n, sizeof(n));


    SoundSys.PlayAndForget(SoundSys.GetEventIDByPath(m_isFemaleHero?"Sounds/WarZ/PlayerSounds/PLAYER_GRUNTING_F":"Sounds/WarZ/PlayerSounds/PLAYER_GRUNTING_M"), GetPosition());
    }


    After this function add this conditional if
    else if ((StartFallingHeight - newHeight) > 0.1f)
    {
    Flare = (obj_ParticleSystem*)srv_CreateGameObject("obj_ParticleSystem", "Env_FootDust_01", GetPosition());
    }
    btw you can add a low sound after jump in the same function, enjoy it.

    here is the particle code, copy and paste in a txt file and save as .prt format
    https://pastebin.com/5LZiqeGt


  2. #2
    Account Upgraded | Title Enabled! djbadboys38 is offline
    MemberRank
    Aug 2010 Join Date
    TanzanyaLocation
    1,365Posts

    Re: [Snippet] Jump dust particle

    Quote Originally Posted by Bombi View Post
    How to spawn particle after jump, we can see this kinda things in popular games.

    this is extremely easy and lazy, it is just a last minute idea, there're too many small things that we can do to improve this game to look better




    AI_Player.CPP
    Look for this
    (waiting for the [code] tag to be fixed...)




    After this function add this conditional if


    btw you can add a low sound after jump in the same function, enjoy it.

    here is the particle code, copy and paste in a txt file and save as .prt format
    https://pastebin.com/5LZiqeGt
    wow nice release, i wish new weapons sounds (fire,reload etc.)

  3. #3
    Account Upgraded | Title Enabled! Oosmar02 is offline
    MemberRank
    Sep 2013 Join Date
    FranceLocation
    894Posts

    Re: [Snippet] Jump dust particle

    is simple , but the effect change the game lol.
    nice

  4. #4
    I can do it!, i guess... Sylvanas1234 is offline
    MemberRank
    May 2014 Join Date
    PolandLocation
    760Posts

    Re: [Snippet] Jump dust particle

    Quote Originally Posted by Oosmar02 View Post
    is simple , but the effect change the game lol.
    nice
    yea it is
    @Bombi , here is a idea -> try to implement it a bit "further" - as in, you get different ( or no ) particle effects, depending on what material you are ;)

    also imagine having it implemented to cars -> dust covers 24/7 haha

    nice job brother!

  5. #5
    Enthusiast Bombi is offline
    MemberRank
    Jan 2019 Join Date
    D:/ Knox#5391Location
    38Posts

    Re: [Snippet] Jump dust particle

    totally lmaoo that would be awesome in cars with wheels marks decals too, tho I was thinking in footstep decals too

  6. #6
    I can do it!, i guess... Sylvanas1234 is offline
    MemberRank
    May 2014 Join Date
    PolandLocation
    760Posts

    Re: [Snippet] Jump dust particle

    Quote Originally Posted by Bombi View Post
    totally lmaoo that would be awesome in cars with wheels marks decals too, tho I was thinking in footstep decals too
    wouldn't be hard to get a normal map for that, could try to get something like that for you later when i will be back

  7. #7
    Enthusiast Robest100 is offline
    MemberRank
    Oct 2019 Join Date
    29Posts

    Re: [Snippet] Jump dust particle

    Thanks Bombillo,But I think add runs would be better just jump is not enough.



Advertisement