Problem moving 8 directions with the keyboard.

0 favourites
  • 8 posts
From the Asset Store
Rotate & Animation for 16 Direction & Mouse Direction
  • There's something wrong with the software, maybe it's not its fault, I don't know.

    Moving 8 directions with the keyboard doesn't work 100%, at least not for me.

    Here's what you can do:

    Move up

    Move down

    Move left

    Move right

    Move up + left or reverse (top left diagonal)

    Move up + right or reverse (diagonal at top right)

    Does not work:

    Move down + Left or reverse (bottom-left diagonal)

    Move down + Right or reverse (diagonal at bottom right)

    To be reviewed.

    - Another remark: it would be nice to add full support for joysticks.

    so you don't have to code like you do for the keyboard, that would be a big plus.

    - Be able to return the value of the joystick angle (the angle at which the left or right joystick is currently positioned). (This could be used, for example, to move a character at the same angle as the joystick, another idea would be to be able to move the character at a speed proportional to the inclination of the joystick, the more it's inclined the faster the character moves).

    - I don't know if it's possible to do this, but also for the left and right triggers, to know the pressing value, a bit like for joysticks.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • It would be good if the developers could respond to this message to tell me what they think. Am I the only one for whom it is not working as expected? Why don’t they answer? Moreover, by now, it should have been perfected, but it hasn’t. Even when we do it ourselves with the visual code, it doesn’t work! There is definitely a bug here!

  • It's the weekend, so the devs may reply beyond Monday if community hasn't answered.

    I'm not sure I've had similar issues with 8 direction, is it literally a new project, with a sprite, with default 8 direction behaviour?

    Also, you're suggestions could be good to see, although the joystick angle is quite straightforward to get with the angle() expression, but I do agree it could be easier - you could post suggestions here: construct.net/en/forum/construct-3/general-discussion-7/report-bugs-amp-post-128538

  • Yes, it is indeed an object with 8-direction behavior. For the joystick angle, I’m not quite sure how to proceed. I’ve tried this, but it only works for 0 to 180 degrees, and then it becomes negative (-180 to 0). Thank you, I will make a request.

    Edit: I’ve solved the problem by adding 360 if it’s negative, and it works. However, sometimes there are small dead zones.

  • I have another problem; in my example, the 8-direction behavior is disabled, but when I click with my mouse to move the character with the pathfinding behavior, then the 8-direction behavior reactivates, which is not normal.

    https://drive.google.com/file/d/1gZzCOMZ_O_x-IS5MX2c8NIJc1A46vMF8/view?usp=sharing

    Note: It’s not practical to share a file here; we cannot upload a file other than an image, it requires an external host. It would be good to add a way to share files on the site.

  • So what does the staff do, eh?

    Is it too much to ask that they answer me?

    Otherwise I'm going to post a series of so-called bugs and spam the GitHub?

    It pisses me off, why don't they ever reply?

  • I have another problem; in my example, the 8-direction behavior is disabled, but when I click with my mouse to move the character with the pathfinding behavior, then the 8-direction behavior reactivates, which is not normal.

    It reactivates because you're enabling it in "On Pathfinding Arrived" event.

    It pisses me off, why don't they ever reply?

    You have mistakes in your code, it's not their fault or their obligation to help you fix them.

  • Thanks dop2000, I got it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)