8-dir boosting won't work

0 favourites
  • 11 posts
  • Hi all,

    I have this little idea for a game but one feature just won't work. I want it so if I hit 'B', the character will boost in the direction I am holding. This works for 7 of the direction, but for some god unknown reason up/left refuses to work!

    The weird thing is that it definitely recognises that up and left are being held, as if you put another action in there like 'destroy player', that will trigger no problem. It's only that the bullet speed won't fire.

    And the plot thickens: if I change the buttons to A & W instead of up and left arrows, it will work fine, UNLESS the arrow buttons are also held! Even if I disable all other commands except A & W, holding up and left will still render it useless. It really is very peculiar.

    If someone could have a look it would be very much appreciated: dropbox.com/s/iru1zg4cjclwo4z/dinobug.capx

  • i just tried all the combinations with the arrow key and boost. it boost in the direction i held including up/left

  • Might be a lead:

    Keyboard Rollover

    Then again, I can use a combination of UP + LEFT in other games, yet I'm experiencing the problem myself, too.

  • Some lower grade keyboards have weird limits on how many keys you can press at a time. I had an old keyboard where I couldn't hold up/right and the X button on my keyboard.

  • - That link is to this post.

    But strange it works for OrangeTapioca. Also Yarfapet - it still registers the keys are pressed for everything else, just specifically the boost event (which just adds speed to the bullet behaviour) doesn't work for me. I'll try a completely new project and see if I get the same issue.

    EDIT: Just tried on a completely fresh project and get the same problem :/

  • btw just to be sure. when you press up/left it's suppose to boost diagonally in that direction?

  • Tobye sorry, here's the fix'd link.

    Keyboard Rollover

  • OrangeTapioca - yep! Although I can't get any direction to work off it, ever. Yet I can still get it to destroy itself under the same conditions, although it works a little sporadically. All individual buttons and other combinations work fine.

    - Thanks! Maybe that does have something to do with it.

    EDIT: - That must be it. I found if it press left, then up then B extremely quickly one after another it works. Dodgey keyboard I guess. Thanks!

  • Another issue in this capx is that it remembers the last direction you boosted, so if you boost, then land. Then let go of the arrows and hit boost again, it boosts in the last direction you boosted. So if you boost left. Then stop moving and let go of the arrows, then hit boost, you jump to the left.

    Also the boosting teleports you up through solid platforms or down through them as well... so you should disable it under certain conditions, like boosting down when on the ground. Also, you may have to do some testing to see if you hit a solid platform during a boost and stop the character if they do unless you want them jumping through non-jump through objects...

  • I also managed somehow to get the sprite unpinned from the platform object when I bumped into either Gordon or Dino... not sure which it was, but the sprite flew off the left side of the screen and my new invisible sprite was still controllable, I just couldn't see it but the screen still scrolled with it... really weird...

    Ok if I boost off the left edge of the starting platform and hit back the other way toward the platform is when it happens... my visible sprite flies off the screen, and then my invisible sprite gets stuck to the Gordon Sprite when I jump, but when I boost to the right, it gets unstuck from the Gordon sprite and just keeps boosting right it just keeps going and going when I boost and is still invisible... really odd...

    If you can't reproduce I can do a video capture of what I am seeing if you want...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • BluePhaze - Thanks for the additional testing ^^ I had just started with it and wasn't aware of any of those yet. I also found if I boost down and hit the ground before boost ends I will float off the ground a little.

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