Montecore Babcock
Registered User
Join date: 20 May 2006
Posts: 48
|
08-23-2009 16:10
I've read the wiki on llRezObject and there's a parameter at the end that can send an integer value to the newly rezzed object but there's no mention of how its passed (how does the new object receive that value so it can be used)?
|
Rygel Ryba
Registered User
Join date: 12 Feb 2008
Posts: 254
|
08-23-2009 16:16
When an object gets rezzed it does the
on_rez(integer p) { //the "p" here can be used as a channel to start communications or whatever }
if there is no value for "p" it means it wasn't rezzed by a script or a parameter wasn't passed.
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
08-23-2009 16:19
The same way you pass a value to a function... You give the parameter (an integer) a value in the sending program, and the newly-rezzed object receives it. What you do with the parameter is totally up to you. As far as the new object is concerned, it's just a number assigned to a variable called start_param (or whatever you name it in that script's on_rez event). You can use it as a channel number, a dimension, a flag for goodness only knows what ..........
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....  Look for my work in XStreetSL at 
|
Montecore Babcock
Registered User
Join date: 20 May 2006
Posts: 48
|
Great!
08-23-2009 16:29
Thanks. This will help me out immensely.
|
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
|
08-23-2009 16:56
If you don't pass a starting parameter to the rezzed object, the start parameter defaults to 0. This can be useful when you're tweaking something and you don't want things to start happening when you rez it from your inventory rather than from the rezzer -- on_rez(integer p){ if(p!=0){ // i've come out of the rezzer, not someone's inventory // do stuff }
|