User Tag List

Results 1 to 2 of 2

Thread: Problem with 8 direction movement

  1. #1
    Clicker Fusion 2.5

    Join Date
    Apr 2014
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem with 8 direction movement

    I'm using a joystick. I wanted to use 8 direction movement but not use the diagonals. Problem is that now when the joystick direction is diagonal the player just stop, which makes moving around sorta of ankward. Is there any way around this with the standard 8 direction movement? Otherwise could anyone give me an example of a custom 8 direction movement from which I can work?

  2. #2
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    944
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hmmm, I'm not sure if this would be a good idea but how about something like this:

    If (no direction on the joystick) is pressed then UMOVE = 0
    If joystick is pressed RIGHT then UMOVE = 1 : Set guy's direction to right
    If joystick is pressed LEFT then UMOVE = 2 : Set guy's direction to left
    If joystick is pressed UP then UMOVE = 3 : Set guy's direction to up
    If joystick is pressed DOWN then UMOVE = 4 : Set guy's direction to down
    If UMOVE <> 0 then set maximum speed of PLAYER to (however fast you're having him move around) else set maximum speed to 0

    If I'm not mistaken, this would mean that the guy would continue to move in the last known direction the player pressed the joystick until he either pressed in one of the other 4 cardinal directions or the guy would stop if the player wasn't pressing the joystick at all. So if you pressed diagonal the guy would still be moving (I think??)

    Sorry maybe this doesn't make much sense for what you want.

Similar Threads

  1. 8 Direction movement. Need help
    By Hannu in forum Fusion 2.5
    Replies: 9
    Last Post: 13th January 2014, 11:07 AM
  2. Spaceship movement left and right trought bouncing ball movement instead 8 direction?
    By daryuss in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 22nd May 2012, 09:33 PM
  3. eight direction movement and shooting problem
    By brett in forum Multimedia Fusion 2 - Technical Support
    Replies: 24
    Last Post: 17th May 2012, 09:36 PM
  4. 8 direction movement
    By jaaj302005 in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 22nd October 2011, 05:25 PM
  5. 8 Direction Movement and shooting problem
    By IY5 in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 2nd February 2010, 02:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •