The Daily Click ::. Forums ::. Klik Coding Help ::. Odd question.
 

Post Reply  Post Oekaki 
 

Posted By Message

Akai_R



Registered
  16/04/2008
Points
  436
4th May, 2011 at 17:40:43 -

Hello!

Im trying to do kind of a weird thing; by taking the x or y coordinates from an object I want to get a looping number that repeats from zero everytime it hits 32 (for example, 32 is just used cause its the size of my tiles).
So the x coordinate of 4 would be 4 on my looping number and the x coordinate of 36 would also be 4.
So it basically just counts coordinates in cells the sizes of 32. Ive managed to do this before but I cant for the life of me remember how I did it.

 
______
http://akai-r.com/

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
4th May, 2011 at 18:17:36 -

x mod 32

 
n/a

Akai_R



Registered
  16/04/2008
Points
  436
4th May, 2011 at 19:54:26 -

Haha seriously, it was that easy? I remember writing like 3 lines of code last time I did it.
Thank you very much! Now I can continue with the project

 
______
http://akai-r.com/
   

Post Reply



 



Advertisement

Worth A Click