|
Landing Normandy
Proposing 4968
Join date: 28 Nov 2005
Posts: 240
|
10-06-2006 06:52
Hey guys!
Simple one I'm sure... I have a linked set of stairs. When I click on them they all move up by three meters, but what I want to do is have the bottom step go up by 3m and the top step to only rise by 0.25m. The stairs in between will go up incrementally. Effectively allowing you to walk up the stairs to the first floor, then click the stairs and them go up to the second.
What I'm actually doing is making a stair case lift to reveal a hidden room underneath. It's just a matter of making it look nice, that's all!
I've named all the steps as "Step 1", "Step 2" etc from the bottom upwards. Each step is 0.5m deep and there is a rise of 0.25m per step.
I know it's simple, I just don't know how to do it without clicking them all individually!
Oh, also, I'm using a function to only allow me to click it and after 20seconds the door closes automatically!
Cheers guys
|
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
10-06-2006 11:16
You basically have a very similar script in each one. I'm not going to write it for you, but it should be writable from here:
touch_start event that sends a link message saying "move" or similar. (llMessageLinked) link_message event that hears 'move' and starts a timer (llSetTimerEvent) and uses llSetPos() to move the stair the right amount. You'll have to remember that llSetPos in the root prim will move the whole set and account for that movement in the distance moved.. timer event to move back (llSetPos again, and turn the timer off)
Some twiddles to stop it moving up further when up would be nice... states, if statements etc. but the construct above will do the job.
|
|
Landing Normandy
Proposing 4968
Join date: 28 Nov 2005
Posts: 240
|
10-06-2006 13:11
OK, cheers... I'll see what I can do with that then. So I don't need a listen event? Or do I?
|
|
Landing Normandy
Proposing 4968
Join date: 28 Nov 2005
Posts: 240
|
10-06-2006 13:44
Right, a bit more long winded than I thought it would be but we're up and running, though I'm not sure that I made the children listen out for any particular message, they just get a message and change between one or the other... not very neat but it works!
Thanks loads
|
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
10-06-2006 14:55
You're welcome.
And no, need for a listen. As you might guess from the name llMessageLinked() only works on things within a linked object, but it's much nicer on the sim than a listen, and as far as most of us are concerned faster, cleaner and generally all round better WHEN it can be used.
|