Stop Bullet Movement

0 favourites
  • 3 posts
From the Asset Store
This pack contains 10 types of bullet effects, with different shapes and colors.
  • From what I can understand, for the bullet movement, setting speed to 0 or disabling the bullet movement should stop the bullet from moving. I don't know if using a text box or a sprite makes a difference, but I'm using a text box.

    This is what I have so far

    when        X = 1 -> set text box bullet speed to 40

                       -> set bullet angle of motion to 0 degrees

          when textbox X=300 -> set bullet disabled

                             -> set speed=0

    I've tried it with the x=300 text both as a subevent, and on the same level

    when I run it, the textbox moves ok, but it doesn't stop at all.

  • Your text box could be moving to many pixels per sec to ever hit X=300. Try using system: compare two values and check the distance from where you want to stop. Choose the smallest number that works, try 5 or something first.

    +System: distance(TextBox.X, 0, 300, 0) < 5)
    [ul]
    	[li]>Set bullet speed to 0[/li]
    	[li]>Set Y to (300)
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I figured out the problem - I had the distance check in the wrong place <img src="smileys/smiley5.gif" border="0" align="middle" /> Thanks for the help

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)