I must be thinking of a different Hook's law...

All you have to do is this: give the magnet an action that keeps scanning around it for physics entities. You can use events like event_scan and event_detect, and a flag to show which entities are physics entities. Then, if one gets close enough to the magnet, use forces to push the ball at the magnet... phent_addcentralforce, etc.

It would have to be a pretty strong force to overcome other forces + gravity... also, magnetic attraction grows stronger the closer the 2 objects become, just something to keep in mind for realism...


Lead Programmer of Realspawn Productions AIM: gh0s7mp630 MSN: [Email]"mpratt630@hotmail.com"[/Email]