Burst Movement

Get help using Construct 2

Post » Fri Nov 30, 2012 5:30 pm

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.fishbone2012-11-30 17:31:44
B
3
Posts: 2
Reputation: 279

Post » Fri Nov 30, 2012 6:27 pm

I'd like to help, but I don't exactly know the problem! Could you state it a bit more clearly?
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Fri Nov 30, 2012 7:58 pm

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
B
83
S
21
G
15
Posts: 1,039
Reputation: 15,134

Post » Sat Dec 01, 2012 4:31 am

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.
B
3
Posts: 2
Reputation: 279


Return to How do I....?

Who is online

Users browsing this forum: Vallar and 19 guests