I'm trying to make a floor that will set an texture on another prim as long as there is someone on the floor.
I'm trying with this:
Floor:
default
{
collision(integer num_detected)
{
llSleep(2.0);
if (llDetectedType(0) & AGENT)
{
llSay(35, llDetectedName(0));
}
}
collision_end(integer num_detected)
{
llSleep(2.0);
if (llDetectedType(0) & AGENT)
{
llSay(35, "Default_Texture"

}
}
}
Texture prim:
default
{
state_entry()
{
llSetTexture("Default_Texture", 0);
llListen(35, "stage", NULL_KEY, ""

llListen(45, "", llGetOwner(), ""

}
listen(integer channel, string name, key id, string message)
{
if (channel == 35)
{
llSetTexture(message, 0);
}
if (channel == 45)
{
llSetTexture(message, 0);
}
}
}
It works.. somewhat.
In the texture prim, I have a texture named as my avatar name.
So when I am standing on the floor, it shows the picture, for a few seconds. Then it reverts back to the Default_Texture.
I suppose that the script comes to collision_end when I am not moving.
I'l looking for suggestions on how to get around this, I don't want to have the Default_Texture set untill I completely leave the floor.