SketchyPhysicsWiki
No edit summary
No edit summary
Line 1: Line 1:
In the onTick property, you can write in a ruby-script that will run in a set interval.
+
In the onTick property, you can write in a Ruby script that will run in a set interval.
   
   
Line 16: Line 16:
 
|[[onTick]]
 
|[[onTick]]
 
|}
 
|}
*if you want to disable the script of an object you can simply uncheck the onTick checkbox, the script will stay on that object, but it will not run in the simulation
+
*If you want to disable the script of an object you can simply uncheck the onTick checkbox, the script will stay on that object, but it will not run in the simulation
*if you mark an objeck as Ignore, it's scripts will be ignored aswell
+
*If you mark an objeck as 'Ignore,' its scripts will be ignored as well.
*remember that every script will increase lag/lower simulation speed, so keep them short and simple
+
*Remember that every script will increase lag/lower simulation speed, so keep them short and simple.
*the script in onTick field will be run on every frame of simulation by default, or at the frame-rate you input in the Rate field
+
*The script in onTick field will be run on every frame of simulation by default, or at the frame-rate you input in the rate field.
*a high Rate is useful for initialization because that script will then only run on frame 0(the start of simulation)
+
*A high rate is useful for initialization because that script will then only run on frame 0 (the start of simulation).
*even a low Rate can attribute to huge lag/speed improvements, because an onTick field with Rate of 5 will use 5x less computing power then he one with Rate of 0 or 1
+
*Even a low rate can attribute to huge lag/speed improvements, because an onTick field with rate of 5 will use 5x less computing power then he one with rate of 0 or 1.
 
[[Category:UI settings]]
 
[[Category:UI settings]]
 
[[Category:Article stubs]]
 
[[Category:Article stubs]]

Revision as of 01:04, 17 December 2010

In the onTick property, you can write in a Ruby script that will run in a set interval.


Extra info:

Other Properties
Magnet
Thruster
Emitter
onTouch
onTick
  • If you want to disable the script of an object you can simply uncheck the onTick checkbox, the script will stay on that object, but it will not run in the simulation
  • If you mark an objeck as 'Ignore,' its scripts will be ignored as well.
  • Remember that every script will increase lag/lower simulation speed, so keep them short and simple.
  • The script in onTick field will be run on every frame of simulation by default, or at the frame-rate you input in the rate field.
  • A high rate is useful for initialization because that script will then only run on frame 0 (the start of simulation).
  • Even a low rate can attribute to huge lag/speed improvements, because an onTick field with rate of 5 will use 5x less computing power then he one with rate of 0 or 1.