Difference between revisions of "Move to target"
Jump to navigation
Jump to search
DuraS Torok (talk | contribs) (Reword the comment into better English) |
|||
Line 14: | Line 14: | ||
default | default | ||
{ | { | ||
state_entry() // | state_entry() // This example uses "state_entry", so the item moves as soon as it is rezzed. | ||
// | // This could be another event such as "touch_start" when it will move only if | ||
// Or use "on_rez" and the item will move only if rezzed, and now directly when | |||
//"on_rez" | // the script is compiled. | ||
// | |||
{ | { | ||
llSetStatus(STATUS_PHYSICS | STATUS_PHANTOM, TRUE); // | llSetStatus(STATUS_PHYSICS | STATUS_PHANTOM, TRUE); // This must be used | ||
// with | // with physics (we move the item, and phantom, it's not needed, but better if the object | ||
// | // doesn't collide with anything. Also, it's physics, so be carefull, only 31 prims | ||
// for an item allowed. | // for an item allowed. | ||
llMoveToTarget(<53.654,199.364,502.542>, 10); // | llMoveToTarget(<53.654,199.364,502.542>, 10); // This will move the item to the | ||
// vector <X,Y,Z> locally on the current sim. "10" is the speed, so the | |||
// | // object will move slowly. | ||
} | } | ||
} | } |
Revision as of 12:04, 19 May 2007
Will Move your object to a position
// script created by SpiritWolf Chikuwa // // /!\ PUBLIC DOMAIN /!\ // You can Copy/Mod/Trans // Please, do not resell this script and give it full perm // Just please leave this header intact // // Minor changes: (insert your name here and delete this comment if you do any mod of this script, thank you) // // Script start here: default { state_entry() // This example uses "state_entry", so the item moves as soon as it is rezzed. // This could be another event such as "touch_start" when it will move only if // Or use "on_rez" and the item will move only if rezzed, and now directly when // the script is compiled. { llSetStatus(STATUS_PHYSICS | STATUS_PHANTOM, TRUE); // This must be used // with physics (we move the item, and phantom, it's not needed, but better if the object // doesn't collide with anything. Also, it's physics, so be carefull, only 31 prims // for an item allowed. llMoveToTarget(<53.654,199.364,502.542>, 10); // This will move the item to the // vector <X,Y,Z> locally on the current sim. "10" is the speed, so the // object will move slowly. } }