Burst Movement

0 favourites
  • 4 posts
From the Asset Store
______________ Burst backgrounds ________________
  • Hi guys!

    I'm working on a space shooter now, and I'm trying an odd movement system... but I could use some help in working out how to actually get it done in Construct.

    Here's the effect I want:

    1)The player can aim in 8 directions via the arrow keys (done)

    2)By pressing a button, the player "boosts" in the direction they are aiming (no problem here either)

    3)Boosting is two-staged- tap for a short movement, press fully for a bigger burst (problem- my current implementation doesn't properly lock out other movement directions while waiting for the next burst stage... ie, I get a small right boost while waiting for the big up burst)

    I'd really love to just use a switch statement in combination with a frame counter to determine the direction and distance easily, but... I honestly can't find switches, and have even had some difficulty getting simple else's to work.

    Something tells me I'm fighting the engine rather than letting it work for me, so I thought I'd send out an SOS before I crash for the night. I've got some ideas about how I could get it done, but they seem unnecessarily complicated so I am open to suggestions!

    Thanks a lot for reading, and thanks even more for any replies.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'd like to help, but I don't exactly know the problem! Could you state it a bit more clearly?

  • Not sure I get it either, but I think you could get a result using "on key released" for the short boost, and "key is down" for the longer boost.

    Use a variable to time the long boost, and only allow the short tap if you're in the beginning of the boost, then you can block the movement and the long boost for a while after you release the key

  • It's tough to describe it more clearly. I've got a strange idea in mind, I guess. It's a Mario-jump style two-stage movement, but without gravity and in 8 directions.

    7Soul's idea to break it into to key down and key released events should do the job, though. A key release while the boost timer is low means the player wants a short boost. I just need to lock out the short burst for a few frames after a long boost ends. Thanks man!

    I'm starting to get a feel for how Construct operates. Maybe. I just need to polish out the deceleration now.

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