The Daily Click ::. Forums ::. Klik Coding Help ::. 5 direction shooting
 

Post Reply  Post Oekaki 
 

Posted By Message

Benny Lindberg



Registered
  08/11/2010
Points
  54
1st November, 2011 at 21:10:15 -

Hi there! I'm working on a shooter, and I want the player to be able to shoot in the directions Left, right, left up, right up and up. I'm not sure how to do the right up and left up though. How would you formulate the "while pressed down" events? I tried "while Up is pressed down" and "while left is pressed down", but it didn't work as I hoped.

Any ideas?

 
n/a

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
1st November, 2011 at 22:02:54 -

what sort of movement is it? platformer? Top down? Is it a custom movement or inbuilt?

 
n/a

Benny Lindberg



Registered
  08/11/2010
Points
  54
1st November, 2011 at 22:07:56 -

It's a custom movement platformer

 
n/a

markno2



Registered
  06/06/2006
Points
  865

Game of the Week WinnerVIP MemberPicture Me This Round 30 Winner!Weekly Picture Me This Round 39 Winner!Kliktober Special Award Tag
2nd November, 2011 at 00:43:52 -

Well I would have "while Up is pressed" and "while Left is pressed" set alterable value A to "1"

Then I would have "fire is pressed" and "alterable value A equals 1" -- fire in the up-left direction.

Of course the animation might not work because of how you programmed the rest of the engine. Probably best to just post the whole thing and let someone fix it.

 
Discarded pizza boxes are an indispensable source of cheese.

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
2nd November, 2011 at 04:12:22 -


Here's an example I whipped up.

http://www.whenthereisnoroominhellthedeadwalktheearth.com/MMF/aiming.mfa

Hopefully it is what you're after or will give you an idea of what you can do.

 
n/a

Benny Lindberg



Registered
  08/11/2010
Points
  54
2nd November, 2011 at 10:20:49 -

Thanks, that worked! I forgot to mention that the character can only stand still while shooting or aiming, but I fixed that!

 
n/a
   

Post Reply



 



Advertisement

Worth A Click