Hello,
My game will have a total of 24 sprites spawned when launched. I want to select a random one of these and move it to a different position and layer. What is the best way to go about choosing this random sprite? I want to be able to reference this selected sprite for other lines of code as well.
Thank you for your help.
Are these different objects, or one object with 24 instances?
Use System -> Pick random.
If different objects, add them to a family, use Pick random ObjectsFamily.
dop2000 They are 24 different objects. I will try the System --> Pick random ObjectsFamily once I get the paid version. Thank you for your help.
Develop games in your browser. Powerful, performant & highly capable.
Add all sprites into a Family.
Use Create Object and pick Family, Construct will pick random sprite from your family.