Why does my player sprite move without input?

0 favourites
  • 4 posts
From the Asset Store
In this template the music plays without looping in your game
  • Hello everyone,

    I am working on a little prototype with a sprite that has both the Bullet and the 8DirectionMovement behavior.

    For the life of me I can't find the reason why when I enable 8DirectionMovement on the player object it shoots up.

    I tried recreating the same object with the same behaviors and the new one doesn't have the same issue. My events also don't betray any sort of logic that would make this happen.

    Here are my setup and events:

    https://i.imgur.com/e0mWPZH.png[/img]

    https://i.imgur.com/NnEPMTl.png[/img]

    When I hit play I get this:

    https://i.imgur.com/SMwi4Fw.gif[/img]

    It is slow because I am stepping through the debug window to make it easy to see what is going on.

    Any idea what is happening?

  • It is slow because I am stepping through the debug window to make it easy to see what is going on.

    And? You should be able to see in the debug window why the Player sprite is moving - either in Bullet or 8direction tabs it will have non-zero speed.

  • > It is slow because I am stepping through the debug window to make it easy to see what is going on.

    And? You should be able to see in the debug window why the Player sprite is moving - either in Bullet or 8direction tabs it will have non-zero speed.

    Apparently having speed or not doesn't affect this. Bullet behavior is disabled and has speed of 900. 8DirectionMovement has no speed but is enabled.

    If I set Bullet speed to 0, it doesn't affect the issue. The issue is nullified ONLY when I disable 8DirectionMovement. Moreover, I am not pressing any buttons whatsoever and the speed on 8DirectionMovement is 0.

    The only clue I have is that the Y of the player is incrementing and thus causing this movement. But I can't see any events in the sheet that increments that value only reads it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Try disabling all events related to 8direction behavior, or even all events in the project. If the player stops moving, then the problem is in one of the events. Then re-enable them in batches and you should be able to find the rogue one.

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