Draw a random image
-
I have two monsters images and every time an encounter happens I would like to randomly draw one of the monsters
-
if there on the same sprite sheet you could set the drawsheet with the tile number using a variable monster = 0 drawsheet(monsterimages,monster,0,0,1).
then whenever you change the monster variable the image would switch.
if there on different image files you could just use
if monster ==1 then
drawsheet(monsterimage1,0,0,0,1)
endif
if monster == 2 then
drawsheet(monsterimage2,0,0,0,1)
endif
Using monster = 0 as a false so nothing is drawn.If your using sprites same principle but your using setspriteanimation
and if a separate image file then you would need to setspriteimage as well as the animation. -
@waldron Thank you I will give it a try!
-
It works thanks for the help!