[How to] Randomize sprites....

0 favourites
  • 7 posts
From the Asset Store
Build your map with these isometric objects and terrains
  • How do I go about randomizing sprites appearing at the top of the screen

    and going down. When it reaches down it would disappear. Let's say the sprites (enemy), is coming down from the top. How do I do that. Currently my sprites appear randomly next to the player.

    Here's is my event sheet:

    Because I can't post links please go to puush site ending. /5iKgE.png

    Any suggestions??

  • small example of "enemies" falling from a random position at the top of the screen to the bottom and then being deleted

    enjoy

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That link doesn't work :(

  • for some reason he added a space behind it try this one new link

  • Thank you for the link. But for some reason the objects aren't spawning

    on the screen. Its only when I implement

    is outside layout

    et angle toward (object.X, object.Y)

    but you can guess that it would be useless seeings it is suppose to be destroyed when it hits the bottom

    Any suggestions

  • Just checking with you Cuddle, you are not using the is outside layout without repositioning them inside the layout again, are you? In this case they would sit in a loop forever outside the layout.

    You could use an array to randomise them - there is a RandomArray plugin linked away from this website somewhere. Also try to maintain a pool of sprites rather than keep instantiating them, it's a more efficient approach and if you deploy to mobiles it will save you extra headaches when you get there.

    P.

  • Thank you for your suggestion. I guess I was in a loop.

    For a better approach, I will try to implement it!!

    Thanks everyone!

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