How do I Make my missile

0 favourites
  • 7 posts
From the Asset Store
Lasers, Blasts, Beams, Bullets, & Missiles! AAA quality Energy FX for your game.
  • ok guyz here is my problem !

    i spawn a missile then when it hit an other object it spawn let say 5 object a random angle ... and then destroy the missile

    but then if i shoot more missile if one of them hit the object they all destroy

    and then they all spawn 5 object and then also set angle of others object spawned wich make them looking really unreal

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can you please provide a screenshot of your events?

  • test

    http://kiugetski.com/Site/rocket/

    screen shot of the script

    https://www.dropbox.com/s/le6qk5wt0ayja ... 2.png?dl=0

    missile key is space

  • I believe you'll need a For Each condition.

    When you don't use For Each, the event will run all actions for all picked objects at once. With For Each, the event will run once for each picked object individually.

  • On the screenshot you call a function without picking any missiles, so all of them are destroyed. I recommend not using function here (replace "call function" with the function actions). Or, if you want to use function, add a parameter and set it to UID of the missile. Then pick a missile by UID. I hope this makes sense to you.

    Also, move the first action of event 4 just before the "destroy" action. It will get rid of every rock changing its angle every time.

  • UID ? how do you get its id

  • As Lasmelan said:

    Best to not use a function.

    Otherwise, you need a condition to pick the specific missile you want destroyed. There are a few ways to do this, including with uid, but again it is best to not use a function here.

    To use UID - in the event where Missile on collision, you would add an action to set a variable to Missile.UID. Then in the function, you would add a condition to Pick by UID, and reference that variable.

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