Modme Forums

Spawning FX with BulletTrace.

Game Modding | Call of Duty: Black Ops 3 | General Discussion


ModmeBot:

Thread By: MrNoobington
Hi. Was just wondering how I'd spawn an fx at the end of a bullettrace. Eg) The player shoots the floor and an fx is spawned where the shot hits. I've looked through the bo3 gsc files but can't find anything exact. I also somehow mess up when attempting bullettraces.
This is what I have currently:

trace = bulletTrace( self getEye(), self getOrigin() - ( 0, 0, 60 ), false, self );
final.origin = trace["position"];
SpawnFX("skull_weapon_zombie_mist", final.origin);
self IPrintLnBold(final.origin);

Also wondering how I'd add gravity to the shot (similarly to the kt4). Would I just put a range limit on the bullettrace and work out how to drop the coords to the ground?

Thanks in advance.


ModmeBot:

Reply By: Harry Bo21

MrNoobington
Hi. Was just wondering how I'd spawn an fx at the end of a bullettrace. Eg) The player shoots the floor and an fx is spawned where the shot hits. I've looked through the bo3 gsc files but can't find anything exact. I also somehow mess up when attempting bullettraces. This is what I have currently: trace = bulletTrace( self getEye(), self getOrigin() - ( 0, 0, 60 ), false, self ); final.origin = trace["position"]; SpawnFX("skull_weapon_zombie_mist", final.origin); self IPrintLnBold(final.origin); Also wondering how I'd add gravity to the shot (similarly to the kt4). Would I just put a range limit on the bullettrace and work out how to drop the coords to the ground? Thanks in advance.

your tracing from player eye, to the 60 units under the players feet

you cant find treyarch doing this because... well... they dont. Theres no need

The kt4 for example doesnt fire bullets, its projectiles, which you can get the impact location from, as for "gravity" as you put it - thats all weapon file settings