Tell me how to make the appearance of particles not near the player?

0 favourites
  • 4 posts
From the Asset Store
Particles support animations, collisions, effects and etc.
  • I made an appearance of the enemy at any point of the 1000x1000 layout, but the problem is that the enemy can appear directly from or on the players. How to avoid the appearance of the enemy in a radius of say 300 pixels from the player?

    If I ask to degenerate + Player.X and Player.Y then enemies appear generally outside the layout.

  • make it appear and then do distance and if too close destroy it and make it appear again and so on ?

    Yes, this is a good idea. Thank.

    But it will not be optimized.

    By the way, if you do such a check, it will destroy all the enemies that will approach the player

  • Enemy.X = random(0+(Player.X-300)) to make it appear on the left side and

    Enemy.X = random(1000-(Player.X+300))+(Player.X+300) to make it appear on the right side

    Do same for Y if this is a top down game

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > By the way, if you do such a check, it will destroy all the enemies that will approach the player

    no because the check happens upon enemy generation trigger for that specific enemy, not all the time for every enemy

    Understood thanks, so I did something wrong)

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