|
PattehPh0x Katsu
The Ph0x.
Join date: 27 Jun 2006
Posts: 50
|
07-27-2006 21:25
I'm having an issue where when I use this script in a poseball, as soon as an avatar is sitting, it uses close to a second of script time, I can't seem to figure out why... string animation; key avatar;
default { state_entry() { llSitTarget(<0,0,0.001>,ZERO_ROTATION); animation = llGetInventoryName(INVENTORY_ANIMATION, 0); } on_rez(integer param) { llResetScript(); } changed(integer change) { if(change == CHANGED_LINK) { avatar = llAvatarOnSitTarget(); if(avatar != NULL_KEY) { llSetAlpha(0, ALL_SIDES); llRequestPermissions(avatar,PERMISSION_TRIGGER_ANIMATION); llStartAnimation(animation); } else { if (llGetPermissionsKey() != NULL_KEY) { llSetAlpha(1, ALL_SIDES); llStopAnimation(animation); } } } } }
|
|
Angela Salome
Registered User
Join date: 6 Oct 2005
Posts: 224
|
07-28-2006 00:20
From: PattehPh0x Katsu I'm having an issue where when I use this script in a poseball, as soon as an avatar is sitting, it uses close to a second of script time, I can't seem to figure out why... ... llRequestPermissions(avatar,PERMISSION_TRIGGER_ANIMATION); llStartAnimation(animation);
You can only start an animation after it's been granted permission in the event run_time_permissions.
|
|
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
|
07-28-2006 11:41
The answer to this is simpler than you think: in the region "top scripts" list, it sums up all scripts in a linked object when reporting the time, and this includes avatars sitting on the object, and any scripts in their attachments. Most avatars take up a fair amount of script time with their attachments. Unless an avatar is sitting on a scripted object, their script time won't be reported in the region top scripts list at all.
|
|
Angela Salome
Registered User
Join date: 6 Oct 2005
Posts: 224
|
07-29-2006 00:10
From: Lex Neva Unless an avatar is sitting on a scripted object, their script time won't be reported in the region top scripts list at all. On the contrary, with a empty sim with one avatar standing and attaching a badly scripted weapon system, the script time jumps noticable from 1mS to around 10mS. I tested this out very recently with a friend on his new sim.
|
|
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
|
07-29-2006 10:39
No, I think I didn't make myself clear. Unless an avatar is sitting on a prim, their scripts won't show up in the estate tools "Top scripts" list that's available to private sim owners and estate managers. Their script time WILL still show up in the "Active Scripts" number and "Script Time" in the control-shift-1 list. I thought that the top scripts list was what the original poster was going by.
|
|
Angela Salome
Registered User
Join date: 6 Oct 2005
Posts: 224
|
07-29-2006 18:58
OK thank you for that clarification, Lex.
|
|
PattehPh0x Katsu
The Ph0x.
Join date: 27 Jun 2006
Posts: 50
|
07-30-2006 03:03
Yes I was reading off the top scripts list when I was testing this.
|