dim3 Forum

Full Version: Multiple Ammunitions from a single gun (E.G Shot gun)?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am sorry about all of these questions, but i would like to know how to get a gun firing multiple shots (i assume you could just make multi shot the default fire but i don't know how.),Thanks for putting up with me.
Okay, you'll need to make a seperate weapon for each weapon, or maybe the same if you want to have, say dual weilded pistols. If you want to do a shot gun, the way i do it is have a lot of projectiles spawn using weap.projectile.spawnFromCenter('bullet'); but have some randomness involved.
You want to check out this object in the scripting API:

Code:
weap.projectile.

There's a bunch of different variations, with these themes:

1) Where the projectile spawns from "WeaponBone" "ObjectBone" "Center" etc
2) Any additional angles of firing "Offset Angle"
3) Multiple projectiles "Multi"
4) Slop (i.e., random spread of weapon) "Slop"

So, for instance, you could do:

Code:
weap.projectile.spawnFromWeaponBoneMultiSlop('Pellet',10,100);

That would spawn 10 pellet projectiles, each in a random pattern with a radius of 100.

[>] Brian
Ah. Sorry. My way lags alot, i was wondering why.
Thanks
Reference URL's