Page 1 of 2

OSSL, NPC's and scripts...

Posted: Wed Jun 29, 2022 11:25 am
by JoJo Dreamer
Hi everyone. Little background info: Im using the Active-NPC to controll my NPCs. I have one problem though - i am telling one of my NPC's to interact with it. This is done on channel 68 but i cant get it to work. If i do a command on ch 68, it all works. If the NPC does the same, it doenst work.
So i made a prim with a script inside, activated on touch. If i touch it it works. If the NPC touches it, it doesnt.

I understand only estate managers can use OSSL, so my question is:
if I make a prim, and I make a script inside it (that i want to communicate with the NPC-controller): if a NPC touches it, does it count as "me" running the OSSL-script, or does it count as the NPC (who naturally isnt an estate manager..)?

thanks in advance and i hope i made myself understandable :)

Re: OSSL, NPC's and scripts...

Posted: Wed Jun 29, 2022 11:37 am
by Ilan Tochner
Hi JoJo,

Different people have different OSSL permissions, based on their relation to the world and/or parcel the script is running in. See: https://www.kitely.com/virtual-world-ne ... functions/

You may find this forums thread relevant: viewtopic.php?p=26357

Re: OSSL, NPC's and scripts...

Posted: Wed Jun 29, 2022 1:20 pm
by JoJo Dreamer
Ilan Tochner wrote:
Wed Jun 29, 2022 11:37 am
Hi JoJo,

Different people have different OSSL permissions, based on their relation to the world and/or parcel the script is running in. See: https://www.kitely.com/virtual-world-ne ... functions/

You may find this forums thread relevant: viewtopic.php?p=26357
Nods, and thank you for your reply. And i am an estate manager - but my question was: if i (as estate manager) create a touch controlled object that includes a script, and let a NPC touch that object, does it "count" as me (creator) or the NPC (toucher)? Because when i touch it all works but when the NPC touches same object, it does not work.

Edit: touched object is set to reset a NPC-controller (OSSL)

Re: OSSL, NPC's and scripts...

Posted: Wed Jun 29, 2022 1:28 pm
by Ilan Tochner
Scripts use the Owner permissions.

Re: OSSL, NPC's and scripts...

Posted: Wed Jun 29, 2022 1:41 pm
by JoJo Dreamer
Ilan Tochner wrote:
Wed Jun 29, 2022 1:28 pm
Scripts use the Owner permissions.
Then this is very strange: "Because when i touch it all works but when the NPC touches same object, it does not work."

Re: OSSL, NPC's and scripts...

Posted: Wed Jun 29, 2022 3:13 pm
by Graham Mills
It's possible that there is some issue with Active-NPC or your object. The demo for this function works OK.

http://opensimulator.org/wiki/OsNpcTouch

Just pop the script in a prim, touch it and then the NPC does the rest (random prim colour changes).

Re: OSSL, NPC's and scripts...

Posted: Wed Jun 29, 2022 3:44 pm
by JoJo Dreamer
Graham Mills wrote:
Wed Jun 29, 2022 3:13 pm
It's possible that there is some issue with Active-NPC or your object. The demo for this function works OK.

http://opensimulator.org/wiki/OsNpcTouch

Just pop the script in a prim, touch it and then the NPC does the rest (random prim colour changes).
Thank you Graham, but i get the NPC to touch my prim, thats is not the problem.
In the script i let it tell its touched (to verify). Then the script sends a command to restart that Active-Npc (another object).
When my NPC touches it, it only says "touched" but it does NOT reset the Active-Npc.

Edit: if i in local chat command the A-NPC to reset, it does. If another person says same command it replies "[08:52] ActiveNPCs: Denied access to xxxxx". But since Ilan says "Scripts use the Owner permissions." i am wondering why my script isnt "allowed" to reset the A-NPC... does it count the "toucher" as owner in this case, instead of me as creator :)

Edit 2: lets pretend my command to reset A-NPC is to say "/54 resetanpc"
if i say this in local it resets. if anyeone else says the same it responds "Denied access.."
So, my simple touch prim script would be like this:
default
{
touch_start(integer n)
{
llSay(0, "starting reset");
llRegionSay(54, "resetanpc");
}
}

..but above does not work.. and my *guess* is that it has denied access...

Re: OSSL, NPC's and scripts...

Posted: Wed Jun 29, 2022 4:04 pm
by Graham Mills
I haven't done much with Active-NPC for a while so can't comment further.

Possibly worth noting this in case it's relevant viewtopic.php?f=26&t=6325

Re: OSSL, NPC's and scripts...

Posted: Wed Jun 29, 2022 4:25 pm
by JoJo Dreamer
Graham Mills wrote:
Wed Jun 29, 2022 4:04 pm
I haven't done much with Active-NPC for a while so can't comment further.

Possibly worth noting this in case it's relevant viewtopic.php?f=26&t=6325
thanks again Graham, i did as above and tested both options of the "Anyone can visit" checkbox on the Access tab of About Land. No difference.

Re: OSSL, NPC's and scripts...

Posted: Wed Jun 29, 2022 4:42 pm
by Graham Mills
Not an expert but I note that Active-NPC has a permissions system. I wonder if that's causing the problem (see under Permissions).

https://github.com/opensimworld/active-npcs