How do I make odd and even numbers?

Hi, GS dudes.
I am gonna display images depends on odd and even numbers. How do I make it?
I tried [Attribute][PlayTime]=[game.Playtime*2+1], but it didn't work.
Please help!!
I am gonna display images depends on odd and even numbers. How do I make it?
I tried [Attribute][PlayTime]=[game.Playtime*2+1], but it didn't work.
Please help!!
Best Answers
-
JohnPapiomitis Posts: 6,256
Create a seperate attribute called evenDetector
when you want to check if another attrbute is odd or even(ill use an attribute called number as an example or a attribute you want to check)
change attribute evenDetector to number%2
That will change the attribute evenDetector to either a 0 or a 1. If its a 0 then number is even, if its a 1 its odd.
So in the other actor you want to change the image have a rule
if attribute evenDetector=0
-change image to even image
OTHERWISE
-change image to odd image
That should do it for ya
Answers
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
@lukey5227 Thanks, but I could not figure it out with that.