Author Topic: Hitscan weapons  (Read 822 times)

Hey people, I was wondering how to make hitscan weapons, as in a pistol. Well, more taking a script and putting it somewhere else. I plan to change the Gui name, sounds, etc, but how would I take the 800 Rifle hitscan and put it into the Gun? Copy the 800Rifle.cs and the [Hitscan file] and put them into the gun? Thanks for any help!

Copy Support_RaycastingWeapons.cs from the 880 Rifle into your weapon's folder, add the line exec("./Support_RaycastingWeapons.cs"); to your server.cs file, then open it for a list of fields you will need to add to your weapon's ShapeBaseImageData datablock to make it use the hitscan functions.

It will not function if your weapon has an alternate firing method e.g. like the Shotgun. If you want spread or multi-shot the use the raycast spread/shots variable, don't edit ::onFire. Weapons like the Gun (that do Parent::onFire) are fine.

O.O
Nevermind. Thanks, though. I'm good.