Dual Weapons

Topics regarding Scripting with Reality Factory
Post Reply
dylanwinn
Posts: 84
Joined: Wed Mar 05, 2008 6:15 am

Dual Weapons

Post 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)
Lynkyn
Posts: 48
Joined: Sat Jun 21, 2008 2:17 pm

Re: Dual Weapons

Post by Lynkyn »

Scripted weapons

Juutis knows a lot of that XD
dylanwinn
Posts: 84
Joined: Wed Mar 05, 2008 6:15 am

Re: Dual Weapons

Post 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?
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Re: Dual Weapons

Post by Jay »

Make a scripted player fly:

Use the ForceUp(...) command when the player presses the Spacebar.
Everyone can see the difficult, but only the wise can see the simple.
-----
dylanwinn
Posts: 84
Joined: Wed Mar 05, 2008 6:15 am

Re: Dual Weapons

Post 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!
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Re: Dual Weapons

Post 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.
Pain is only psychological.
Post Reply