Randomising Sprites

0 favourites
  • 3 posts
From the Asset Store
2d mushroom sprite 2d game character enmy sprite game art
  • Hello,

    I have one sprite called "Coral" and this sprite has one animation with several frames, the frames are all different visuals of corals. I want to be able to pepper around this one sprite and using code create a random assortment of corals.

    I wish to do this so that I don't have to create a bunch of sprites and I don't have to place them all myself. I want to do this because of the cool effect I believe it will have.

    I have tried to use the following events but all the sprites simply start at the same place and go through all the animations. I believe there is something I am not getting, I have tried many different solutions including stopping the animation etc.

    <img src="http://img208.imageshack.us/img208/1590/problem01j.png" border="0" />

    I am probably making a silly mistake, but if anyone can see it or can suggest a better option, I would be thankful.

    Regards,

    Ian

  • Have a look at this tutorial I wrote:

    construct.net/en

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is genius. It works perfectly well and I have learnt something to boot. Cheers.

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