Strange problem when disabling platform behavior

Get help using Construct 2

Post » Thu Feb 06, 2014 7:32 am

Hi guys, i am facing an strange problem in my game i have a bike which i created by the help of this tutorial https://www.scirra.com/tutorials/240/physical-bike/page-1

I have added some extra features to the game.

Ex : When user activated the power watch enemy movement will be slow down for 5 seconds.Below is the steps i have used.



This is my events to move the bicycle.



My problem is when user selects the power watch ,

1. if the bicycle is moving at that time i cannot stop the bicycle though i pressed the left arrow key. it moves forward untill game ends.

2. if the bicycle is not moving at that time i cannot move the bicycle though i pressed the right arrow key.

Need help guys i cannot find where i went wrong..Thank you...hardrockz2014-02-06 07:34:26
B
4
Posts: 18
Reputation: 286

Post » Thu Feb 06, 2014 8:41 am

Platform and Physics are two "moving" behavior, meaning they can handle movement for your sprites.
When you activate platform, if you let the controls to Default (you can change this in the behavior parameters), it will capture the keyboard, and use the arrows to control the Platform sprite (here, your enemy).
Doing this, you loose control of the bicycle.
The solution is simple : change the parameters of the behavior to "Custom controls", and all should be good.
B
17
S
8
G
4
Posts: 473
Reputation: 6,191

Post » Thu Feb 06, 2014 10:52 am

Hi, Thanks for the reply now i have added the custom controls to enemies.and i tried to slow down the enemy.But same problem occurs   
B
4
Posts: 18
Reputation: 286

Post » Thu Feb 06, 2014 12:26 pm

So if I understand right, the bike stops reacting to inputs, and the enemy don't slow down. Could you share the capx ?
There may be something with the enemy movement. How do you move them ? Using the platform behavior and simulate input ?
B
17
S
8
G
4
Posts: 473
Reputation: 6,191

Post » Fri Feb 07, 2014 5:21 am

I used platform behavior for enemies. I have used keyboard input instead of buttons.Now it works fine (I don't know why.But now it works     ) Thank you very much for your help
B
4
Posts: 18
Reputation: 286


Return to How do I....?

Who is online

Users browsing this forum: KSLR and 40 guests