How to Spawn object only once

0 favourites
  • 2 posts
From the Asset Store
Change the size and position of everything without calculating anything!
  • I have this plane that flies (doh' <img src="smileys/smiley9.gif" border="0" align="middle" /> )   

    Want this plane to shoot only one missle when it closes within a distance of another object on map.

    What I did is

    Event ( system -> distance(plane.X,plane.Y,myobj.X,myobj.Y) < firedistance)   then   

    Action ( plane spawn missile, ... missle set angle to plane.angle)

    Now what this obviously does is .. as long as the distance is less .. it will keep spawning missiles.

    I only want it to spawn once.

    I tried to use "trigger once" .. but that makes only the first plane to fire a missle.. and the next ones dont.

    Please advise :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • add "for each" condition to range check. should work

    (

    For each "Plane"

    system -> distance(plane.X,plane.Y,myobj.X,myobj.Y) < firedistance)

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