Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

is there a way to check if theres room for it before it tries to rez it?

RacerX Gullwing
Magic Rabbit
Join date: 18 Jun 2004
Posts: 371
12-07-2005 07:44
I have a present that has a sort of dramatic way it rezzs stuff. I just tried it with my alt and
even though there wasn't room to rez the toy it wasn't still inside after that message about not enough prims to rez said object. I thought maybe we had a fail safe so stuff there wasn't room to rez didn't just disapear. But theres not. So is there a way to check if theres room for it before it tries to rez it?
Beatfox Xevious
is THOUSANDS OF PEOPLE
Join date: 1 Jun 2004
Posts: 879
12-07-2005 11:26
I'm assuming making this object copyable isn't viable? If you can do that, it would at least solve the problem of it disappearing from inventory.

As far as I know, there is no way to check how many prims are available on a parcel using LSL. That might actually be a feature worth suggesting.
_____________________
My Beatworks: Zephyr Chimes wind chimes, the KanaMaster Japanese kana tutor, and the FREE Invisibility Prim Public. Look for them at the Luskwood General Store in Lusk (144, 165).

"You have been frozen. You cannot move or chat. A pony will contact you via instant message (IM)."
- mysterious system message I received after making off with Pony Linden
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
12-07-2005 11:49
Can you make something copy/no-mod/no-transfer? So it would be able to rez a copy, but can't be removed from the containing item, and wouldn't be editable.
This way the controlling script could then just rez the item, and if successful (ie a key is returned in the object_rez() event) then delete the item from inventory?

[edit]
I suppose that actually leads me to a basic check. Simply have your package attempt to rez SOMETHING else first, if it succeeds then it can send it a message to delete this test object (put the same number of prims on it as the actual item, but maybe make it invisible), then rez the actual item.
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
12-07-2005 12:33
From: Beatfox Xevious
I'm assuming making this object copyable isn't viable? If you can do that, it would at least solve the problem of it disappearing from inventory.
The real problem is that this is a bug... SL shouldn't delete it from Contents until it's finished successfully rezzing.
Tiger Crossing
The Prim Maker
Join date: 18 Aug 2003
Posts: 1,560
12-07-2005 13:00
The problem with rezzing some other object first to see if there is room (like a linked bunch of inisi-cubes) is that parcel prim limits aren't "live" so even after the temp object has de-rezed, the prims it took up won't be freed immediately. Given the tight permissions on the gift object, there's no sure-fire way to make it work.

I wonder what happens if a no-copy, temp-on-rez object is rezed from a script then allowed to expire on its own a few minutes later... Does it return to some inventory then?
_____________________
~ Tiger Crossing
~ (Nonsanity)
Beatfox Xevious
is THOUSANDS OF PEOPLE
Join date: 1 Jun 2004
Posts: 879
12-07-2005 13:03
From: Argent Stonecutter
The real problem is that this is a bug... SL shouldn't delete it from Contents until it's finished successfully rezzing.

I suppose that's true. Have you bug-reported it yet? I would, but I'm at work.
_____________________
My Beatworks: Zephyr Chimes wind chimes, the KanaMaster Japanese kana tutor, and the FREE Invisibility Prim Public. Look for them at the Luskwood General Store in Lusk (144, 165).

"You have been frozen. You cannot move or chat. A pony will contact you via instant message (IM)."
- mysterious system message I received after making off with Pony Linden
Beatfox Xevious
is THOUSANDS OF PEOPLE
Join date: 1 Jun 2004
Posts: 879
12-07-2005 13:10
From: Tiger Crossing
I wonder what happens if a no-copy, temp-on-rez object is rezed from a script then allowed to expire on its own a few minutes later... Does it return to some inventory then?

I'm betting it wouldn't, unless one of the devs already took that particular scenario (a rather unlikely one, I would think -- what would that be useful for, anyway?) into consideration when working on the system.
_____________________
My Beatworks: Zephyr Chimes wind chimes, the KanaMaster Japanese kana tutor, and the FREE Invisibility Prim Public. Look for them at the Luskwood General Store in Lusk (144, 165).

"You have been frozen. You cannot move or chat. A pony will contact you via instant message (IM)."
- mysterious system message I received after making off with Pony Linden