How to use 'on step' with bullet movement?

This forum is currently in read-only mode.
From the Asset Store
This pack contains 10 types of bullet effects, with different shapes and colors.
  • I'm trying to set up an instant-hit shot, but it doesn't seem to work. The event is currently:

    If leftmouse is down, create object 'laser', set angle to mouse location

    On step and on collision between laser and enemy, destroy enemy

    Thoughts?

  • the mouse location cannot become an angle ( coz mouse location = (x,y) and angle is (0-360)..)

    hope this helps..

    but u could have a "dummy sprite" that is very very invisible. that way, u could have your object point towards that dummy sprite and you could launch you laser object towards that dummy sprite.

    also, the bullet movement for the laser is useful..

  • couldn't you have the object actually spawn at mouse location, and have that object do what you want it to do?

  • the mouse location cannot become an angle ( coz mouse location = (x,y) and angle is (0-360)..)

    hope this helps..

    but u could have a "dummy sprite" that is very very invisible. that way, u could have your object point towards that dummy sprite and you could launch you laser object towards that dummy sprite.

    also, the bullet movement for the laser is useful..

    What in the world are you talking about? "bullet: Set angle towards (mouseX, mouseY)" works just fine.

  • hehehe... i didnt see some words.. i was being stupid.. i didnt know u used "towards".

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • BTW in regards to the original problem I think you should use 'Is overlapping' instead of 'On collision':

    + On step

    + Is overlapping Object

    : Destroy bullet etc.

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