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
// 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