Jake r phy (talk | contribs) No edit summary |
No edit summary |
||
(8 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
− | + | In the onTick property, you can write in a [[Ruby | Ruby script]] that will run in a set interval. |
|
+ | |||
+ | |||
+ | |||
+ | '''Extra info:''' |
||
+ | {| align="right" border="1" cellpadding="1" cellspacing="1" width="100" |
||
+ | |+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 object 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. |
||
[[Category:UI settings]] |
[[Category:UI settings]] |
||
[[Category:Article stubs]] |
[[Category:Article stubs]] |
Latest revision as of 08:45, 6 March 2011
In the onTick property, you can write in a Ruby script that will run in a set interval.
Extra info:
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 object 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.