Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llTargetOmega in attachments

Merlin Alphabeta
Registered User
Join date: 12 Feb 2006
Posts: 83
10-03-2007 18:03
So I've got this attachment I'm going to post the simplest possible script that causes the problem. The reset's aren't technically required to cause the problem, taking them out doesn't seem to change it, but just in case they might be involved I left them in...

default {
state_entry() { llTargetOmega(<0., 0., 0.>, 0., 0.); }

on_rez(integer num) { llResetScript(); }

attach(key id) { llResetScript(); }

touch_start(integer num_detected) {
llTargetOmega(<0., 0., 1.>, 1., 1.);
}
}

Save it - click it - it starts spinning. Reset, it stops. Wear it, click it, it starts spinning. Reset, it stops.

Deteach then wear from inventory. Clicking won't make it start spinning. Re-save the script (not sure about reset) and it works. Drop it in-world and touch it, it starts spinning.

Has anyone experienced similar behaviour? Got a work-around?
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
10-03-2007 21:06
The llTargetOmega function seems to break in different ways with each release. See for some history of the woes plaguing this function. What sometimes helps is to try to trick the sim into sending an update to the client in some way... llSetText() used to do it; llSetScale() is also said to work sometimes. Or, there's the option of just abandoning llTargetOmega and live with the jerkiness of a bunch of llSetRot (or similar) slave scripts.