How do I make a sprite randomly spawn in different location?

0 favourites
  • 6 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • this is what i got, but it still respawn in the same location.

    System:Every 2.0 second

    System:Pick Random Instance ( Spawn ) --> System: Create object (Sprite 4) on layer 0 (Spawn.X , Spawn.Y)

  • How are you setting Spawn.X and Spawn.Y?

    You can add a condition after or before the object is created that says something like;

    Set Spawn.X to random(value)

    Set Spawn.Y to random(value)

    This should change the Spawn variables and make the spawn position change each time.

    ~Sol

  • How are you setting Spawn.X and Spawn.Y?

    You can add a condition after or before the object is created that says something like;

    Set Spawn.X to random(value)

    Set Spawn.Y to random(value)

    This should change the Spawn variables and make the spawn position change each time.

    ~Sol

    I've cloned my spawn sprite. how make it random?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • you set its position to x = random (0,100)

    and its y position to =random(0,100)

  • you set its position to x = random (0,100)

    and its y position to =random(0,100)

    thanks all for your replies =)

    Is there a possibility to use 8 directions without using arrow keys? i mean the sprite wont be controlled by the player

  • On the 8-direction movement set default controls to no, after that you can change them in the event system. But implementing AI with 8-direction is bad idea, use the pathfinding behavior instead.

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