Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

need assistance augmenting my rez script

Lefty Belvedere
Lefty Belvedere
Join date: 11 Oct 2004
Posts: 276
12-08-2005 15:30
I'm creating a rezer that will rez a set of tp balls. I currently have the following script and it does what it does well enough except i'm going to need the following changes made to it. Any help would be greatly appreciated, you all have helped me out of a jam several times :)

I need it do accept a list of objects at different coordinates instead of only one object.
I need it to use global coordinates instead of it's current object-centric coordinates.
I need it to auto derez the object after 30 secs

if somebody could make those quick changes I'd be very greatful. You guys have always rocked in the past! :)

~Lefty

P.S. it uses an additional kill script and a PIN script for each object rezed.

-----------------

From: someone
// Rezzer
string OBJECT_NAME = "shower"; // Name of object to rez
vector OBJECT_OFFSET_POS = <0,0,-3>; // Position to rez object at
rotation OBJECT_OFFSET_ROT = ZERO_ROTATION; // Rotation to rez object at
vector OBJECT_VELOCITY = ZERO_VECTOR; // Velocity to rez object at

string DIE_SCRIPT_NAME = "die"; // Name of the die script
integer PIN_MAX = 2147483647; // INT_MAX
integer PIN_MIN = 1; // avoid 0 because it is used as the
// start param when rezzed from inv

integer OWNER_ONLY = FALSE; // If only owner can use

key object_key = NULL_KEY; // Key of rezzed object
integer object_rezzed = FALSE; // Whether object is rezzed
integer object_pin; // PIN for rezzed object

integer random_pin() {
return llCeil( llFrand(PIN_MAX - PIN_MIN) ) + PIN_MIN;
}

default {
touch_start(integer num) {
if ( OWNER_ONLY && (llDetectedKey(0) != llGetOwner()) )
return;

if ( object_rezzed ) { // Object is already rezzed
llRemoteLoadScriptPin( object_key, DIE_SCRIPT_NAME, object_pin, TRUE, TRUE );
object_key = NULL_KEY;
object_rezzed = FALSE;
} else {
object_pin = random_pin();
llRezObject(
OBJECT_NAME, llGetPos() + OBJECT_OFFSET_POS, OBJECT_VELOCITY,
llGetRot() * OBJECT_OFFSET_ROT, object_pin
);
object_rezzed = TRUE;
}
}

object_rez(key id) {
object_key = id;
}
}
Kage Seraph
I Dig Giant Mecha
Join date: 3 Nov 2004
Posts: 513
12-08-2005 15:40
llSetTimerEvent(30);

timer()
{
llDie();
}

to get globals:

llGetPos() + llGetRegionCorner();

(I think)
Lefty Belvedere
Lefty Belvedere
Join date: 11 Oct 2004
Posts: 276
12-08-2005 17:15
actually, thanx anyways to whoever was going to help me with this script :) i think I am going to use temp_on_rez and a non-linked set instead. Thank you, anyways everyone

~Lefty
Lefty Belvedere
Lefty Belvedere
Join date: 11 Oct 2004
Posts: 276
12-08-2005 17:31
eh, i take that back... I need the object to delink once it's rezed so that each tp ball can be interactive but i hav eno idea how to create a proper delink script...

how do i set this up properly so that the object unlinks itself when it rezes?

default
{
state_entry()
{
llBreakAllLinks();
}

}

all help greatly appreciated :)

~Lefty