Page 1 of 1
Dual Weapons
Posted: Sun Aug 24, 2008 6:13 am
by dylanwinn
First, is it possible to have the player hold 2 weapons (controlling one with left-click and the other with right)?
Second, how do you implement alt-fire? (like throwing a grenade or using your machine gun's fancy flamethrower attachment)
Re: Dual Weapons
Posted: Sun Aug 24, 2008 12:54 pm
by Lynkyn
Scripted weapons
Juutis knows a lot of that XD
Re: Dual Weapons
Posted: Sun Aug 24, 2008 8:21 pm
by dylanwinn
Lol
I know that I need to use scripted weapons, I wanted to know how to use them!
Also, anyone know how to make a scripted player fly when you hold down the spacebar, like a jetpack?
Re: Dual Weapons
Posted: Sun Aug 24, 2008 8:52 pm
by Jay
Make a scripted player fly:
Use the ForceUp(...) command when the player presses the Spacebar.
Re: Dual Weapons
Posted: Mon Aug 25, 2008 5:55 am
by dylanwinn
Thanks Jay, I couldnt seem to find it in the manual. Would the syntax for that be "forceup(10)" with 10 being the ammount to raise the player, or is it more complicated than that?
EDIT: Never mind, I figured it out!
Re: Dual Weapons
Posted: Mon Aug 25, 2008 10:44 am
by Juutis
First, is it possible to have the player hold 2 weapons (controlling one with left-click and the other with right)?
Second, how do you implement alt-fire? (like throwing a grenade or using your machine gun's fancy flamethrower attachment)
I'm afraid I can't explain it in depth as I'm really busy with my life right now. But basically: Two pawns, each working independently, moving with the player and rotating with the camera. They check if the mouse keys are pressed and fire a projectile. Or check if the alt-fire button is pressed and shoot a different projectile. My demo game has dual weapons. You may download it from my signature.