Bullet movement problem

Get help using Construct 2

Post » Fri Apr 01, 2016 11:28 am

Guys i start to feel stupid. I add "touch" and "bullet" behaviors to a sprite. All i want to make it stop/move on each tap action.

I tried to compare "m" variable and assign bullet speed according to m variables value. for example

m=0 bul.speed=0
M=1 bul.spped=100

Then i compare value of m and add extra consition "on tap" to change value of m from 0 to 1 or vice versa.

When i run it, bullet object stops on tap gesture without problem. However on next tab its not moving.

I am in a cafe so cant add capx but will try to take photo of small example and add here if i can.
B
21
S
4
G
4
Posts: 161
Reputation: 3,803

Post » Fri Apr 01, 2016 11:43 am

Btw i tried enabling/disabling bullet instead of changing speed. It's not working either.

I know there is very simple mistake i made :/
B
21
S
4
G
4
Posts: 161
Reputation: 3,803

Post » Fri Apr 01, 2016 11:44 am

try
Image

or use Else

Image
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Fri Apr 01, 2016 11:55 am

@korbaach Thank you mate, i keep movng some pixels before stopping but it works.

Do you have any idea why my method is not working?

Esit: didnt see your second suggestion. Only difference between your 2nd sug. and what i did is you use "else" i use value=1
B
21
S
4
G
4
Posts: 161
Reputation: 3,803


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests