M
MechaZoid
Guest
Ok, so my problem is with the image angle variable. I'm creating a dungeon map generator that consists of a bunch of objects with random image indexes, and I'm trying to give them a random rotation (0, 90, 180, 270) every time i generate a new map. No errors show and the program runs fine, but the images wont rotate, no matter what i try.
(also I know there are other threads on this topic but I haven't found any that will fix my problem)
This is the step event for the map objects (global.changing and image_index = random(6) is part of the code for choosing a random image and works fine)
Thanks.
(also I know there are other threads on this topic but I haven't found any that will fix my problem)
This is the step event for the map objects (global.changing and image_index = random(6) is part of the code for choosing a random image and works fine)
Code:
if (global.changing = true) {
image_index = random(6)
rot = random(3)
if (rot = 0) image_angle = 0
if (rot = 1) image_angle = 90
if (rot = 2) image_angle = 180
if (rot = 3) image_angle = 270
}