0 Favourites

Stop Bullet Movement

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

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • 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)
  • 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)
Similar Topics Posts Views Last Post
Unread hot topic
233 22,246
TiAm's avatar
TiAm
Unread hot topic
0 Favourites
Path Movement Behavior
98 52,470
R0J0hound's avatar
R0J0hound
Unread hot topic
48 6,874
DUTOIT's avatar
DUTOIT