Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

novice (very novice) scripter in need of help

Rhaorth Antonelli
Registered User
Join date: 15 Apr 2006
Posts: 7,425
07-26-2007 21:50
I am attempting to create a script that will rez a multi part object, then at the press of a button, de rez that object and rez a new multi part object.

I am a bit confused to say the least and am not sure where to turn.

I have a holo vendor that kinda does what I need, but the stuff in there loses me.
I do not need a vendor as this will not be an item for sale, I just need to be able to switch from one build to another at the push of a button.

Please forgive me if I am asking about this in the wrong place. I do not want to cross post in the wanted section, and figured more scripters would see it here.

If you (anyone) can help me with this, or have a script that does this and is willing to sell it please contact me.

the script would be needing to handle a multi part object such as a house or smallish town type build) something that can not be linked into one piece.

Thanks in advance for your time and understanding
_____________________
From: someone
Morpheus Linden: But then I change avs pretty often too, so often, I look nothing like my avatar. :)


They are taking away the forums... it could be worse, they could be taking away the forums AND Second Life...
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
07-26-2007 23:41
You need to use a toggle... before the default state put this:

integer Flag = TRUE;

then, in your touch_start () event, something like this:

if (Flag)
{
Flag = FALSE;
//rez object 1 one here
}
else
{
llSay (-1234,"DIE";);
// rez object 2 object here
}


then, in your first object, put in a script with a listen on channel -1234, and if the message equals "DIE" then do an llDie() to kill the first object. That way, first time you touch the object, it rezzes object 1, the second, it sends a message to the object 1 to kill itself, as the rezzing object cannot kill another object, but it can tell it to kill itself. The second time you touch the object, the flag will be false, the command will be sent to kill object 1, and then rez object two.
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
07-27-2007 03:58
Guessing at "gotchas" that might arise for a new scripter:

For rezzing multi-prim objects, the behavior of llRezAtRoot() is a lot easier to comprehend than that of llRezObject().

You can't rez more than 10m away, so for big things, they may need to contain a script that moves them over to where they actually belong.

To handle multiple multi-part objects, you may need a notecard or some naming convention to know which parts to rez together.

Because you'll be unrezzing the items, each linkset will have to be scripted to listen for the command to llDie(), and you'll have to have copy perms on the objects (or else they'll only rez once).

All things considered, this is not a bad project with which to begin scripting.
Rhaorth Antonelli
Registered User
Join date: 15 Apr 2006
Posts: 7,425
07-27-2007 07:27
oh dear
I am more of a scriptard than I thought, you both totally lost me :(

well hopefully the suggestions will be able to help someone else, right now I am too tooooo much of a novice.
I do thank you very much though for the suggestions, someday they might make sense to me

(I feel so stupid)
_____________________
From: someone
Morpheus Linden: But then I change avs pretty often too, so often, I look nothing like my avatar. :)


They are taking away the forums... it could be worse, they could be taking away the forums AND Second Life...
Doran Carter
Registered User
Join date: 14 Feb 2007
Posts: 6
Always some one more 'stupid' than you
07-27-2007 09:44
From: Rhaorth Antonelli
oh dear
I am more of a scriptard than I thought, you both totally lost me :(

well hopefully the suggestions will be able to help someone else, right now I am too tooooo much of a novice.
I do thank you very much though for the suggestions, someday they might make sense to me

(I feel so stupid)


A bit off topic, but I just had to comment – I’m trying to learn scripting as well, I’m more than a lurker, trying to learn from reading here and other places about SL scripting.

Don’t loose heart Rhaorth, you may have not learnt a lot yet, that doesn’t mean you’re stupid. I’m sure you know more than me :)
2fast4u Nabob
SL-ice.net
Join date: 28 Dec 2005
Posts: 542
07-27-2007 11:07
An important aspect of of learning to script (an I'm referring to SL specifically) is that you are actually learning a few things: the programming language, the SL API, and SL itself.

LSL is a fairly simple language, in terms of basic statements and keywords like 'for', 'if-else', 'integer', etc. You should be able to quickly pick up the essentials so that you can understand something like this (sample is from the wiki):

float getAbsoluteValueOf(float value) {
if (value < 0)
return value * -1;
return value;
}


Things get interesting with the API (application programming interface). The API is referred to as 'functions' and they all begin with LL. The API allows your code to act on objects, communicate, etc within SL. The API has its quirks...just find some threads about lists and memory for a start.

The last part is learning the platform of SL itself. SL has its own funky-ness: lag, server restarts, region crossing, avatars interacting with your object through attachments, sit, touch, etc. You also need to learn about money and the funkyness of communications over HTTP, email and other aspects.

SL is a really cool platform - I call it my playground because it is relatively safe and I can securely handle money, safely move people, and communicate using a number of standards :)

So, when you are learning about scripting, keep in mind that you are learning a number of things at the same time and that might help in case you get frustrated. The payoff is being able to create something that you really like or need, or make cool stuff for others - and there is nothing quite like seeing someone else see the value, buy, and use something that you made.

-2fast
Rhaorth Antonelli
Registered User
Join date: 15 Apr 2006
Posts: 7,425
07-27-2007 20:03
I am able to grasp simple scripts but when it gets to the complex stuff I get lost

:(

I so wish someone would step forward that knows how to do this and tell me they can, I will gladly pay for this type of script

ty for the words of encouragement
_____________________
From: someone
Morpheus Linden: But then I change avs pretty often too, so often, I look nothing like my avatar. :)


They are taking away the forums... it could be worse, they could be taking away the forums AND Second Life...
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
07-28-2007 10:58
From: Rhaorth Antonelli
the script would be needing to handle a multi part object such as a house or smallish town type build) something that can not be linked into one piece.

Thanks in advance for your time and understanding

Sounds like you need a holo-deck.

There are both freebie and commercial products that will rez a house or small town. They usually have some name like faux-rez or Foo-rez or some such.

Keep looking, and good luck.

BTW, have you searched SLExchange or SLBoutique?
Rhaorth Antonelli
Registered User
Join date: 15 Apr 2006
Posts: 7,425
07-29-2007 15:44
not a holodeck, but found what I needed
someone saw this thread and contacted me, they had EXACTLY what I needed

A big big thank you to them.
(sorry not logged in to grab landmark in case anyone else needed this type of thing)
I will put it here when I get in game

I think the original use was for setting up room furnishings (it is how they display it being used) but soooo many possibilities!!
_____________________
From: someone
Morpheus Linden: But then I change avs pretty often too, so often, I look nothing like my avatar. :)


They are taking away the forums... it could be worse, they could be taking away the forums AND Second Life...