PDA

View Full Version : Crouch attacks



kerek
April 3rd, 2005, 01:47 AM
I want to implement some crouch attacks into my game.

So obviously, I have the down arrow as crouch. So once your holding down to crouch, these need to be checked.

Thing is, I don't know exactly the best way to do it. Say I have 2 weapons , the regular sword and a bow and arrow. I want them both useable while crouching.
So I want the sword attack to be the same button as the normal attack.. how would I do this? Limit the regular standing sword attack to only when he isn't crouching? and make the bow attack a different key altogether?

That should work I suppose.

Any comments/suggestions? What's the best way to check multiple keys?

nathan99
April 4th, 2005, 09:02 PM
do u meaN this code?




}
if (Key.isDown(Key.DOWN) && Key.isDown(Key.SPACE)) {
//action
}
if (Key.isDown(Key.DOWN) && Key.isDown(Key.CONTROL)) {
//action
}


that should work although i havent tested it

nathan99
April 4th, 2005, 09:06 PM
yeh that works

Lord Rahl
April 6th, 2005, 03:44 PM
Hey Kerek, I saw the post a while back you had on your game and like I said there, GJ. Tho another thing you may want to work on in it if you already haven't fixed is the down movment prob. I noticed then that when you hold and and then hold right after while still holding down, The character stands up and the screen moves without him to a certain point. Wasn't sure if you meant to do this or not. But if not, here is another thing to fix.

kerek
April 6th, 2005, 04:58 PM
I'm kind of putting the Penny Arcade game on hold for a Retail Blunders game.

Although Retail Blunders has similar aspects, the characters and story are unique and all my creation.