716
« on: April 26, 2018, 03:54:44 AM »
All this package does is allow 1) Multiple projectiles to be fired at once without additional coding for each weapon (like a shotgun) and 2) has the player's velocity affect the bullet velocity, like say, for example, if you're in a vehicle and shoot straight forward or if you're falling you won't fall past your own bullets
You can get bullets to fire from the back of the weapon by using %obj.getEyeVector() instead of %obj.getMuzzelPoint()
A raycast projectile isn't really a projectile and is just a light of sight check. Raycasting weapons use containerRayCast() to see if there's any objects between point a (the player) and point b (the maximum range of the weapon) and if the raycast finds a player in that line of sight, it damages the player and/or spawns an explosion manually, completely bypassing onProjectileHit().
From what I can gather your hitmarker add-on probably packages onProjectileHit() and as does Slayer. For compatibility it would be ideal to do a raycast and, instead of manually damaging the player or spawning an explosion, would be spawning a projectile literally inches from the player with the same properties. Most weapons don't do this as it requires a bit more coding and calculation and might cause a bit of lag on a server with a bunch of projectiles flying about and hitting stuff.
Topic belongs in modification help