Hello,
I’m making a game where player should choose 1 picture out of 4.
So the one I need will change the scene.All 4 pictures placed in a row.
As well I got stack on picture random placement,they need to be on random place every time I reload the level.
Here is order:
http://img220.imageshack.us/img220/6304/dsfdsfu.png
For example 1 is apple,2 is orange,3 is grape,4 is pineapple.
Next time I load level I want them to change their number(placement).
How to realise that?
[import]uid: 49851 topic_id: 26649 reply_id: 326649[/import]
Make an array of the image file names
local fruit = {}
fruit[0] = "apple"
fruit[1] = "orange"
fruit[2] = "grape"
fruit[3] = "pineapple"
and when you display each one, use
display.newImageRect ( yourGroup, fruit[math.random ( 0,#fruit-1 )] ......
There might be mistakes in that code.
Hope this helps
[import]uid: 127106 topic_id: 26649 reply_id: 108017[/import]
Thanks for your reply, I’ll try it. [import]uid: 49851 topic_id: 26649 reply_id: 108112[/import]