First time posting here so I'm not completely sure how this goes, but a friend told me to post my problem here, so here goes.
I'm using Game Maker 8.1 for a simple project, and I've come to a halt due to not knowing how to find a multiple of a variable.
I currently have this code:
if step = 941 || step = 941 + 205*1 || step = 941 + 205*2 || step = 941 + 205*3 || step = 941 + 205*4
{
alarm[0] = 1
}
"step" is a variable that an object is adding +1 every frame.
Now what I want to do is that this function fires itself when the step variable is either 941, or 941 + any multiple of 205 (as in 205, 410, 615, 820, etc)
I tried using the mod function (%), but
if step = 941 || step = 941 mod 205
{
alarm[0] = 1
}
didn't work, so now I'm stuck.
I really don't feel like putting every 205 manually, but I'll do it IF there's no other option.
Thanks in advance, and sorry for the trouble.