S
SlothSam
Guest
I think I should preface this with the fact that I'm an artist by trade, and coding isn't a thing I do remotely often, so if I made a real dumb mistake, that's why.
I have a sprite with 2 sub images, and I want it to show image 0 from 6am to 6pm, and then image 1 from 6pm to 6am. I couldn't find much of anything to figure out how to do this like I want, and the few friends I have who do have coding experience couldn't help much as none of them have touched GML.
So I kinda just looked through the Date and Time section in the manual and kinda, guessed what it should be. I'm not receiving any error messages, but the sprite did not change, it will only present Image 1. It is set to run the code on the Step event in the drag and drop editor.
Any advice would be appreciated, I'm really just flying blind here.
I have a sprite with 2 sub images, and I want it to show image 0 from 6am to 6pm, and then image 1 from 6pm to 6am. I couldn't find much of anything to figure out how to do this like I want, and the few friends I have who do have coding experience couldn't help much as none of them have touched GML.
So I kinda just looked through the Date and Time section in the manual and kinda, guessed what it should be. I'm not receiving any error messages, but the sprite did not change, it will only present Image 1. It is set to run the code on the Step event in the drag and drop editor.
Any advice would be appreciated, I'm really just flying blind here.
Code:
image_speed = 0;
if (current_hour = 1800 || 1900 || 2000 || 2100 || 2200 || 2300 || 0000 || 0100 || 0200 || 0300 || 0400 || 0500)
{
image_index = 1;
}
else
if (current_hour = 0600 || 0700 || 0800 || 0900 || 1000 || 1100 || 1200 || 1300 || 1400 || 1500 || 1600 || 1700)
{
image_index = 0;
}