8-dir boosting won't work

Get help using Construct 2

Post » Thu May 09, 2013 11:26 pm

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: https://www.dropbox.com/s/iru1zg4cjclwo4z/dinobug.capx
B
27
S
8
G
5
Posts: 429
Reputation: 6,902

Post » Thu May 09, 2013 11:58 pm

i just tried all the combinations with the arrow key and boost. it boost in the direction i held including up/left
B
40
S
10
G
5
Posts: 102
Reputation: 6,602

Post » Fri May 10, 2013 12:22 am

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.TL222013-05-10 00:44:40
B
58
S
20
G
7
Posts: 305
Reputation: 8,804

Post » Fri May 10, 2013 12:22 am

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.
B
51
S
10
G
7
Posts: 184
Reputation: 6,825

Post » Fri May 10, 2013 12:29 am

@TL22 - 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 :/Tobye2013-05-10 00:36:47
B
27
S
8
G
5
Posts: 429
Reputation: 6,902

Post » Fri May 10, 2013 12:42 am

btw just to be sure. when you press up/left it's suppose to boost diagonally in that direction?
B
40
S
10
G
5
Posts: 102
Reputation: 6,602

Post » Fri May 10, 2013 12:45 am

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

Keyboard Rollover
B
58
S
20
G
7
Posts: 305
Reputation: 8,804

Post » Fri May 10, 2013 12:55 am

@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.

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

EDIT: @TL22 - 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!Tobye2013-05-10 00:57:51
B
27
S
8
G
5
Posts: 429
Reputation: 6,902

Post » Fri May 10, 2013 3:51 am

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...
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,428

Post » Fri May 10, 2013 3:56 am

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...BluePhaze2013-05-10 03:59:57
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,428

Next

Return to How do I....?

Who is online

Users browsing this forum: makkancs, Marxally and 31 guests