Double Tap System

Post your Construct-made creations!

Post » Sun Feb 17, 2008 5:14 am

You can just type them, but if you're going through the bottom object thingy in your event window, they're called "Get X position of * edge"... I'm thinking that if you nest some loops into movement to test overlap of objects, then individually test the edge positions, it could work? Will try it, but really don't know if it's any more efficient to introduce new queries.

Edit: Okay, I figured out a way to do it without either system. Dunno if it's accurate, but the result looks fine to me.

http://www.mediafire.com/?6lgnlltt21j
B
4
S
2
G
6
Posts: 161
Reputation: 2,597

Post » Sun Feb 17, 2008 6:01 am

that's awesome! i don't know if there's anything that will break the loop but the logic is definitely correct and we now know of another way to accomplish the same thing! great job Vrav!
B
2
S
2
G
5
Posts: 293
Reputation: 2,236

Post » Sun Feb 17, 2008 1:03 pm

Not bad, guys. Could use a little polishing, but it's a pretty solid system. With a little dash of momentum thrown in you could get rid of the jerky start.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Feb 18, 2008 1:37 am

Yeah, I had a bit more polished system working with only one movement loop. What it did was keep track of direction, 1 being right, -1 being left, and add that to the x position when the movement loop was run. Construct ate the cap, though.

Keeping track of direction facing is useful for the sprite's animation, I would think. It had two animations worked out which were switched between when the direction variable changed. I'd also modulated player.xSpeed, so it would add smoothly. Could have different animations phase out when the speed exceeds a certain point, etc.

In my feeble fiddling however, before the cap combusted, the double-tap system was removed, and replaced with a 'run button' style a la Super Metroid, just for fun. It would gradually speed the player up.
B
4
S
2
G
6
Posts: 161
Reputation: 2,597

Previous

Return to Your Creations

Who is online

Users browsing this forum: No registered users and 2 guests