Is the x vector acting weird for anyone else?

0 favourites
  • 7 posts
From the Asset Store
25 high-quality cars. This asset is perfect for a side scrolling game, or even a turn based RPG type game.
  • I've been following a tutorial, and one of the steps involves applying an x vector to the player sprite which has the platform behavior. However, after seeing that the x vector wasn't doing anything, I tested it: I made an event which would set the player's x vector to 900 when I pressed the M key, but doing the M key did nothing. I did the same with the y vector (which was working fine before), and saw that it correctly applied the vector there.

    tl;dr: Actions are refusing to set any sort of x vector to the player.

    Is this a known problem? If so, can you tell me what's going on?

  • Vector X can't be greater than platform maximum speed.

    Also, if you apply it only once, maybe the character decelerates immediately, that's why you don't see it moving.

    Try using "Is Key Down" event instead of "On Key pressed", press and hold the M key and see if your character moves.

  • Vector X can't be greater than platform maximum speed.

    Too expand dop2000's first comment. You can temporarily boost your characters maximum speed during your conditions for which you need X vector to effect your character. Once complete set the speed back to normal.

    Just make sure you set it up so it is forced to go back no matter what ^^

  • I tried setting a timer during which the player's max speed is set to 750 (750 is the vector I am trying to use), and it still didn't work. (I also tried permanently changing their max speed and setting the vector to a really high number, which again didn't work.)

  • You need to post your project file, it's difficult to guess without it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'll repeat what I wrote in my first comment - if you set vector X only once, the character may decelerate immediately, that's why you don't see it moving. You need to apply it continuously for some time.

    Try using "Is Key Down" event instead of "On Key pressed", press and hold the M key and see if your character moves.

    Is Key M down : Player Set vector X to 700
    

    If this works, then you can use "Is timer running" condition to apply the vector.

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