not_at_target
event
Event syntax
not_at_target() { … }This event may be triggered multiple times if the target has not been reached.
Triggered if an object has not yet reached the target set by the call to llTarget.
not_at_target(){
}Examples
Section titled “Examples”Example 1
20 collapsed lines
integer target_id;vector target_pos;
default{ state_entry() { target_pos = llGetPos() + <5.0, 0.0, 0.0>; target_id = llTarget(target_pos, 0.5); llSetStatus(STATUS_PHYSICS, TRUE); llMoveToTarget(target_pos, 0.4); } at_target(integer tnum, vector targetpos, vector ourpos) { if (tnum == target_id) { llOwnerSay("object is within range of target"); llOwnerSay("target position: " + (string)targetpos + ", object is now at: " + (string)ourpos); llOwnerSay("this is " + (string)llVecDist(targetpos, ourpos) + " meters from the target"); llTargetRemove(target_id); } } not_at_target() { llOwnerSay( "not there yet - object is at " + (string)llGetPos() + ", which is " + (string)llVecDist(target_pos, llGetPos()) + " meters from the target (" + (string)target_pos + ")" ); }}See also
Section titled “See also”Functions
Section titled “Functions”llTarget— Setup a target positionllTargetRemove— Stop a target positionllRotTarget— Setup a target rotationllRotTargetRemove— Stop a target rotation
Events
Section titled “Events”Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.