The Daily Click ::. Forums ::. Klik Coding Help ::. When number is divisible by another?
 

Post Reply  Post Oekaki 
 

Posted By Message

DJ W



Registered
  12/10/2003
Points
  780
26th July, 2004 at 16:56:12 -

Hi im making a game right know that uses a fast loop to set up the level. I start the frame with making the loop have 300 loops. Every time the loop is divisible by 30 loops though I want it to add one to my counter, how would I go about doing this?

 
n/a

Noyb



Registered
  31/05/2004
Points
  1117

VIP Member
26th July, 2004 at 17:07:25 -

The "mod" operator gives the remainder when dividing numbers. So when LoopIndex("Loopname") mod 30 = 0, the loop's index is divisible by 30.


 
"Omg. Where did they get the idea to not use army guys? Are they taking drugs?" --Tim Schafer on originality in videogames

DJ W



Registered
  12/10/2003
Points
  780
26th July, 2004 at 17:29:13 -

Alright thanks, I was trying to use that but i was using the wrong equation with it.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click