serifan_chicken
Member
hi
i have a code for for some d20 dice which can be dragged & dropped and upon drag_end they're "thrown", meaning they move in the direction you dragged them and change change their image until landing upon a random image, in this case a random dice number.
it all works real neat, except:
how i set it up now, i have all the images of the sprite tilted +90° to the right with every new image.
meaning i tilted them before adding them as images.
as this feels tedious since i have to make more dice (d4, d6, d8 etc...); i am sure i can just tilt the image via image_angle for every image in the animation.
i figure i have to use for loops to achieve that, but cant quite figure out how.
so basically i need something like this:
//step
if (?? image number increases by 1 ??)
{
image_angle +=90
}
help pls
i have a code for for some d20 dice which can be dragged & dropped and upon drag_end they're "thrown", meaning they move in the direction you dragged them and change change their image until landing upon a random image, in this case a random dice number.
it all works real neat, except:
how i set it up now, i have all the images of the sprite tilted +90° to the right with every new image.
meaning i tilted them before adding them as images.
as this feels tedious since i have to make more dice (d4, d6, d8 etc...); i am sure i can just tilt the image via image_angle for every image in the animation.
i figure i have to use for loops to achieve that, but cant quite figure out how.
so basically i need something like this:
//step
if (?? image number increases by 1 ??)
{
image_angle +=90
}
help pls