OSSL, NPC's and scripts...

Creating scripts
User avatar
JoJo Dreamer
Posts: 11
Joined: Tue Apr 19, 2022 12:22 pm
Has thanked: 11 times
Been thanked: 8 times

OSSL, NPC's and scripts...

Post 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 :)
Last edited by JoJo Dreamer on Wed Jun 29, 2022 3:47 pm, edited 1 time in total.
These users thanked the author JoJo Dreamer for the post:
Ilan Tochner
User avatar
Ilan Tochner
Posts: 6515
Joined: Sun Dec 23, 2012 8:44 am
Has thanked: 4961 times
Been thanked: 4468 times
Contact:

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

Post 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
These users thanked the author Ilan Tochner for the post:
JoJo Dreamer
User avatar
JoJo Dreamer
Posts: 11
Joined: Tue Apr 19, 2022 12:22 pm
Has thanked: 11 times
Been thanked: 8 times

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

Post 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)
Last edited by JoJo Dreamer on Wed Jun 29, 2022 1:40 pm, edited 1 time in total.
User avatar
Ilan Tochner
Posts: 6515
Joined: Sun Dec 23, 2012 8:44 am
Has thanked: 4961 times
Been thanked: 4468 times
Contact:

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

Post by Ilan Tochner »

Scripts use the Owner permissions.
These users thanked the author Ilan Tochner for the post:
JoJo Dreamer
User avatar
JoJo Dreamer
Posts: 11
Joined: Tue Apr 19, 2022 12:22 pm
Has thanked: 11 times
Been thanked: 8 times

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

Post 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."
Graham Mills
Posts: 1314
Joined: Sun Dec 23, 2012 2:26 pm
Has thanked: 1134 times
Been thanked: 1142 times

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

Post 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).
These users thanked the author Graham Mills for the post:
JoJo Dreamer
User avatar
JoJo Dreamer
Posts: 11
Joined: Tue Apr 19, 2022 12:22 pm
Has thanked: 11 times
Been thanked: 8 times

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

Post 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...
Last edited by JoJo Dreamer on Wed Jun 29, 2022 4:10 pm, edited 1 time in total.
Graham Mills
Posts: 1314
Joined: Sun Dec 23, 2012 2:26 pm
Has thanked: 1134 times
Been thanked: 1142 times

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

Post 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
These users thanked the author Graham Mills for the post (total 2):
JoJo DreamerIlan Tochner
User avatar
JoJo Dreamer
Posts: 11
Joined: Tue Apr 19, 2022 12:22 pm
Has thanked: 11 times
Been thanked: 8 times

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

Post 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.
Graham Mills
Posts: 1314
Joined: Sun Dec 23, 2012 2:26 pm
Has thanked: 1134 times
Been thanked: 1142 times

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

Post 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
These users thanked the author Graham Mills for the post (total 2):
Ilan TochnerJoJo Dreamer
Post Reply