Is it possible (I don't think it is, but I'll ask anyway) to make a weapon so that the left mouse button does a projectile launch and the right button a melee attack? (Like in halo)
Melee/Projectile weapon?
Melee/Projectile weapon?
Over 3 years (has it been that long?) and just now I noticed the day and month of my birthday were switched. Whoops!
Some 2d games I made, haven't made anything in a year though O.o
http://www.yoyogames.com/users/GMer56
Some 2d games I made, haven't made anything in a year though O.o
http://www.yoyogames.com/users/GMer56
Re: Melee/Projectile weapon?
With the built-in weapons? No.
With scripted weapons? Yes.
With scripted weapons? Yes.
Pain is only psychological.
Re: Melee/Projectile weapon?
Can you tell me how?
Over 3 years (has it been that long?) and just now I noticed the day and month of my birthday were switched. Whoops!
Some 2d games I made, haven't made anything in a year though O.o
http://www.yoyogames.com/users/GMer56
Some 2d games I made, haven't made anything in a year though O.o
http://www.yoyogames.com/users/GMer56
Re: Melee/Projectile weapon?
Well, first of all you would need to script your weapon system. In other words, ditch the RF's weapon system (weapon.ini) and build one of your own using pawns and scripts. Basically you need to have a pawn that acts as the weapon: moves with the player, stays aligned with the camera and detects user input (such as mouse clicks). It's a bit tricky, but not overly hard if you have some basic understanding of Simkin and scripting in RF.
After that making the secondary attack is very easy. Just check if the secondary attack button is pressed and then do the secondary attack (play the animation and do damage in melee range or shoot a projectile with very short range).
That is for 1st person weapons only. If you want it to work in 3rd person too you'd have to script the whole player.
After that making the secondary attack is very easy. Just check if the secondary attack button is pressed and then do the secondary attack (play the animation and do damage in melee range or shoot a projectile with very short range).
That is for 1st person weapons only. If you want it to work in 3rd person too you'd have to script the whole player.
Pain is only psychological.
Re: Melee/Projectile weapon?
I see... what would be the function to check if a mouse button is pressed? I think I could take it from there...
Over 3 years (has it been that long?) and just now I noticed the day and month of my birthday were switched. Whoops!
Some 2d games I made, haven't made anything in a year though O.o
http://www.yoyogames.com/users/GMer56
Some 2d games I made, haven't made anything in a year though O.o
http://www.yoyogames.com/users/GMer56
Re: Melee/Projectile weapon?
The manual:
self.lbutton_pressed
Returns the state of the left mouse button
self.rbutton_pressed
Returns the state of the right mouse button
self.mbutton_pressed
Returns the state of the middle mouse button
Pain is only psychological.
Re: Melee/Projectile weapon?
THANK YOU!!!
Over 3 years (has it been that long?) and just now I noticed the day and month of my birthday were switched. Whoops!
Some 2d games I made, haven't made anything in a year though O.o
http://www.yoyogames.com/users/GMer56
Some 2d games I made, haven't made anything in a year though O.o
http://www.yoyogames.com/users/GMer56