Randomising Sprites

Get help using Construct 2

Post » Sat Sep 08, 2012 11:14 pm

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.



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
B
5
Posts: 8
Reputation: 417

Post » Sun Sep 09, 2012 12:58 am

Have a look at this tutorial I wrote:

http://www.scirra.com/tutorials/360/generating-a-random-tile-map
B
16
S
6
G
4
Posts: 23
Reputation: 4,066

Post » Sun Sep 09, 2012 12:33 pm

This is genius. It works perfectly well and I have learnt something to boot. Cheers.
B
5
Posts: 8
Reputation: 417


Return to How do I....?

Who is online

Users browsing this forum: Scofano and 19 guests