Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Arrgh ...

Dragger Lok
(loading ...)
Join date: 10 Sep 2006
Posts: 228
06-17-2008 11:01
Trying to have this script run without manually resetting it, place a llResetScript(); but it just removes it from working even with a manual reset, at my wits end (short trip)


CODE

default
{

state_entry()
{
llSetText("",<1,1,1>,1);
rotation rot = llGetRot();
llRezAtRoot("Object", llGetPos() + <0.0,0.0,0.0>, <0.0,0.0,0.0>, rot, 1000);
}
object_rez(key child)
{
llGiveInventory(child, llKey2Name(child));
}
}
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
06-17-2008 11:16
You're probably using the wrong event for what you want, but you're not likely to get more help than that here for a completely unrestrained self-replicator unless you convince people you have a legitimate application to use it in.
Dragger Lok
(loading ...)
Join date: 10 Sep 2006
Posts: 228
06-17-2008 11:37
From: Hewee Zetkin
You're probably using the wrong event for what you want, but you're not likely to get more help than that here for a completely unrestrained self-replicator unless you convince people you have a legitimate application to use it in.



//Fruit script modifications and amendments by Dumisani Ah with lots of help from the SL Scripting Tips Forum.
//Based in part on the Growth Script By Floog Stuart and Cid Jacob's Photosynthesis Script.

Sould have asked in that post- but since I'm here ...


as seen here on this link ... /54/9d/264336/1.html
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
06-17-2008 13:11
Okay. The things you need to think about then are:

1.) Is the object you are trying to rez really called "Object" in the prim's inventory? If not, you need to adjust the name used in the script (the call to llRezAtRoot()).

2.) WHEN do you want the object to be rezzed. Currently the call to llRezAtRoot() is only done when the script is saved or reset. If you instead want it to happen every few seconds, you'll want to start a timer with llSetTimerEvent() and do it from the 'timer' event handler instead of 'state_entry'. If you want it to rez when the tree is touched, you'll probably want the 'touch_start' event handler. For more possibilities see http://www.lslwiki.net/lslwiki/wakka.php?wakka=events

Also note that the position of the rezzed object will be the same as the position of the prim the script is in. You may want to add an offset of some kind; either fixed if you will only have one rezzed object at a time (or if it doesn't matter whether they are stacked atop each other), or a small random offset if you want them to be distributed around a point so that they are all visible.
Dragger Lok
(loading ...)
Join date: 10 Sep 2006
Posts: 228
06-17-2008 13:52
Thanks, the name of the object and everything works well, has worked well, simply put it works when i manually reset the script and not until.

The position is fine and the timing of the event is delt with by the child prim once the initial "manual" reset is done.

Once again I am trying to not have to open each script and do a reset to it for it to get the ball rolling .... once reset- it performs flawlessly.
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
06-17-2008 15:18
How many are working at the same time? How many cycles before requiring a reset etc? If she works perfectly and then just stops, sounds like you are hitting the grey goo fence.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
06-17-2008 15:52
Like I said, the 'state_entry' event WILL only run when the script is saved or a reset is done. You're going to have to specify WHEN (at what times or under what circumstances) you want the rezzing to happen, and then find the right event(s) to use to make that happen.
Dragger Lok
(loading ...)
Join date: 10 Sep 2006
Posts: 228
06-17-2008 16:15
From: Hewee Zetkin
Like I said, the 'state_entry' event WILL only run when the script is saved or a reset is done. QUOTE]


Ahh that is what I came here for- to figure out how to force a reset onrez ... going in tiny circles.
Dragger Lok
(loading ...)
Join date: 10 Sep 2006
Posts: 228
06-17-2008 16:17
From: Hewee Zetkin
Like I said, the 'state_entry' event WILL only run when the script is saved or a reset is done.


Ah, that is what I came here to ask in the first place, how to force a reset onrez because llResetScript(); won't do it. Was sure that's how I put it in the first place ....
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
06-17-2008 16:27
From: Dragger Lok
Ah, that is what I came here to ask in the first place, how to force a reset onrez because llResetScript(); won't do it. Was sure that's how I put it in the first place ....

Just so we are on the same page. You only want the script to rez one time whenever it is rezzed? Correct?

CODE
default {
on_rez(integer start_param) {
llSetText("", <1, 1, 1 >, 1);
rotation rot = llGetRot();
llRezAtRoot("Object", llGetPos() + <0.0, 0.0, 0.0 >, <0.0, 0.0, 0.0 >, rot, 1000);
}
object_rez(key child) {
llGiveInventory(child, llKey2Name(child));
}
}
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Dragger Lok
(loading ...)
Join date: 10 Sep 2006
Posts: 228
06-17-2008 16:37
Just want the script to reset onrez- once, after that the child prim takes control of resetting the script, be more than happy to drop it on you.
Dragger Lok
(loading ...)
Join date: 10 Sep 2006
Posts: 228
06-17-2008 16:48
From: Jesse Barnett
How many are working at the same time? How many cycles before requiring a reset etc? If she works perfectly and then just stops, sounds like you are hitting the grey goo fence.


Does not work perfectly then stop- never said that, said it works perfectly once it is reset by hand.

ok sorry to have to repeat myself so much, it's not the events i'm concerned with- they all work flawlessly- once the initial script is reset manually the sequence takes over and does exactly as intended no problem no question about it.

what I'm trying to get done simply is have it reset itself once on rez, that's it, no need to do more than that- and llResetScript(); will not do it
Dragger Lok
(loading ...)
Join date: 10 Sep 2006
Posts: 228
06-17-2008 17:06
Ok thanks to all who tried, my partner dug it up in seconds.

state_entry()
{
// Script initialization here
}

on_rez(integer start_param)
{
// Reset script when the object is rezzed
llResetScript();

That's what I was looking for- thanks love *kiss* you so are the best
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
06-17-2008 18:41
So glad you are up and running Dragger.

Sorry for the mistake. We deal with questions from all levels of scripting ability and in this case skipped right over the basics.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum