Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Object lock via script possible?

Lumpy Tapioca
Registered User
Join date: 16 Dec 2004
Posts: 33
12-12-2005 11:07
Excuse if this has been asked before, I can't find any mention here or in the wiki,

Can an object be locked via it's script?
Damien Took
Meat Popsicle
Join date: 3 Dec 2004
Posts: 151
12-12-2005 11:25
What do you mean by locked?
Lit Noir
Arrant Knave
Join date: 3 Jan 2004
Posts: 260
12-12-2005 11:45
I assume you mean lock as in locking a prim so that it can't be edited or moved.

I looked at llSetPrimitiveParams and llSetStatus, figuring that would be the way, but I'm not finding it as an option. So unless I'm blind, or looking at the wrong part of the Wiki, looks like no. A bit surprising to me actually.
Damien Took
Meat Popsicle
Join date: 3 Dec 2004
Posts: 151
12-12-2005 12:07
I know of now way to lock the prim from being edited via a script.
That is set manually when you are editing the prim.
If you mean locked as in changing it from being a physical moving prim to one that is static and locked in place then you would use the llSetPrimitiveParams or llSetStatus like Lit Noir suggested. You would want to set the PRIM_PHYSICS or STATUS_PHYSICS (respectively) to TRUE.
Lumpy Tapioca
Registered User
Join date: 16 Dec 2004
Posts: 33
12-12-2005 13:08
Thanks for your responses.

Yes, I am seeking a way of locking prims in LSL, identically to the lock checkbox being selected.

and

No, it does not look like there is a way of doing it, although one would think that it could be set much in the same way as turning on or off physics.

Perhaps it is a removed feature due to possible greifer use.

I'll have to lock by hand i guess but this is a generator that makes thousand 'o prims
and it would be nice to set it to no edit once it's constructed.
Damien Took
Meat Popsicle
Join date: 3 Dec 2004
Posts: 151
12-12-2005 13:12
NP. :)

Well, you could put one prim in the inventory of the source script with the permissions already set. Then you can rez it as many times as you need and re-shape it and it will have the permissions you need.

Look at replicating prims in the scripting library and forum. I think there is even something in the wiki about it.