View Single Post
# 1 19-02-2013 , 07:07 PM
Registered User
Join Date: Feb 2013
Posts: 2

Repeat function in an expression

Hi Guys,
I am trying to write an expression for a project. So far I have the following:
.........................

magnet1.magnitude = 0;
if (gear.rotateY >360)
{
magnet1.magnitude = -20;
}

.........................
As you can see I have an object called magnet1 which I set to magnitude 0 then when the gear object
rotates to one full rotation it triggers the magnet (a Radial force)
This works well, my question is how do I continue the expression to make the magnet trigger
everytime the gear rotates 360 degress ?
Such as a trigger pulse each rotation of the gear.

Thanks Tony