Corporal Candour
Registered User
Join date: 3 Sep 2005
Posts: 38
|
10-01-2005 12:26
Ok, so I have this ball roll to the end of this marble roll type thing. When the object reaches the bottom, I have it rez another ball at the top and it keeps going. However, when the ball reaches the bottom, I need it to disappear. See the problem is that if the ball stays on the base then hundreds of balls will constantly rez depending on how long it stays there. So I need the events in this order: 1.) Ball reaches bottom 2.) One more ball is rezzed at the top 3.) Original ball disappears This is the script I put in the base of the marble roll track. default { collision(integer tnum) { llRezObject("Marble Run Ball", llGetPos() + <0, 0, 10>, ZERO_VECTOR, ZERO_ROTATION, 42); } } }
|
Zapoteth Zaius
Is back
Join date: 14 Feb 2004
Posts: 5,634
|
10-01-2005 12:51
From: Corporal Candour Ok, so I have this ball roll to the end of this marble roll type thing. When the object reaches the bottom, I have it rez another ball at the top and it keeps going. However, when the ball reaches the bottom, I need it to disappear. See the problem is that if the ball stays on the base then hundreds of balls will constantly rez depending on how long it stays there. So I need the events in this order: 1.) Ball reaches bottom 2.) One more ball is rezzed at the top 3.) Original ball disappears This is the script I put in the base of the marble roll track. default { collision(integer tnum) { llRezObject("Marble Run Ball", llGetPos() + <0, 0, 10>, ZERO_VECTOR, ZERO_ROTATION, 42); } } }
*tries* The easiest way I can see of doing this is edited the above script to say... default { collision(integer tnum) { llRezObject("Marble Run Ball", llGetPos() + <0, 0, 10>, ZERO_VECTOR, ZERO_ROTATION, 42);
llShout(1, "Die" );
} } }
And put this script in the balls you're rezzing default { state_entry() { llListen( 1, "", "", "Die" ); }
listen( integer channel, string name, key id, string message ) { llDie();
} }
May not be the best way of doing things, and I may have got wrong what you want to do.. But hey I gave it a shot, and I can't script 
_____________________
I have the right to remain silent. Anything I say will be misquoted and used against me.--------------- Zapoteth Designs, Temotu (100,50)--------------- 
|
Corporal Candour
Registered User
Join date: 3 Sep 2005
Posts: 38
|
10-01-2005 13:27
Thanks Zapoteth, works like a charm!
|
Dark Korvin
Player in the RL game
Join date: 13 Jun 2005
Posts: 769
|
10-01-2005 13:27
From: Zapoteth Zaius *tries* The easiest way I can see of doing this is edited the above script to say... default { collision(integer tnum) { llRezObject("Marble Run Ball", llGetPos() + <0, 0, 10>, ZERO_VECTOR, ZERO_ROTATION, 42); llShout(1, "Die" ); } } } And put this script in the balls you're rezzing default { state_entry() { llListen( 1, "", "", "Die" ); } listen( integer channel, string name, key id, string message ) { llDie(); } }
It may be better to filter for the the object shouting, thant the message like so (assuming shouting object is named Marble Tray): default { state_entry() { llListen( 1, "Marble Tray", "", "" ); } } listen( integer channel, string name, key id, string message ) { if(message == "Die"  llDie(); } This way someone can't just go up to it and say Die on the right channel.
|
Kujila Maltz
lol
Join date: 6 Aug 2005
Posts: 444
|
10-01-2005 13:36
If a random bystander shouts "Die!" would it also kill the object?
|
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
|
10-01-2005 14:51
Yes-- that's why you wouldn't use channel 1, but something like channel -588234. You have about 4 billion to pick from, and avatars can't send to negative channels.
|