Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Need Help with linked_message, Please

Ilayda Reina
Registered User
Join date: 21 Nov 2007
Posts: 31
10-16-2008 18:26
Well, the particle script was working well, than I added on/off toggle, it also worked well, but it was not possible to reach to the particle source, so I decided to put on/off toggle script in another prim within the same object but I couldn't manage to get it working.

Here are the codes

Particle Script (I only put the section after particle params)
From: someone

default
{
link_message(integer sender_num, integer num_detected, string str, key id)
{
if (str == "ON";)
{
updateParticles();
}
else
{
llParticleSystem([]);
}

}


On/off script

From: someone

default {
state_entry() {

llMessageLinked(LINK_THIS, 0, "OFF", NULL_KEY);
}
touch_start(integer num_detected) {

state on;
}
}

state on {
state_entry() {

llMessageLinked(LINK_THIS, 0, "ON", NULL_KEY);
}
touch_start(integer num_detected) {

state default;
}
}
Faust Vollmar
llSetAgentSanity(FALSE);
Join date: 3 Feb 2007
Posts: 87
10-16-2008 19:04
The "LINK_THIS" in the llMessageLinked calls in script 2 means that the message is only being sent to the Prim that contains the Script. LINK_SET, LINK_ALL_OTHERS or a specific link number would fix that.
Ilayda Reina
Registered User
Join date: 21 Nov 2007
Posts: 31
10-16-2008 19:20
Aww, it worked, thanks a lot :)