Blinky Hover - not workie

Creating scripts
Post Reply
User avatar
Shandon Loring
Posts: 1341
Joined: Sat Oct 26, 2013 3:25 am
Has thanked: 961 times
Been thanked: 1581 times
Contact:

Blinky Hover - not workie

Post by Shandon Loring »

Hi all,
Following simple script works in SL, but not here...
¿Por que?
Thanks for any suggestions.

> The desired result is a simple looping blinking of the the hovertext from red-to-green-to-red-etc-etc, which is what happens in SL.
> The actual result here in OS however is red-green-full stop.

Thanks all!!
(yes it has llSleep with seems to have developed it's own special hate society, and i could probably set up explicit 'states' and switch between them, but that aside... something is keeping this super simple script from working... just curious what it may be? Hint: it's not the emoji's, those are legal)

default
{
state_entry()
{
llSetText(" \n👆\n \n ", <1.00,0.0,0.0>, 1);
llSleep (0.5);
llSetText(" \n👆\n \n ", <0.00,1.0,0.0>, 1);
llSleep (0.5);
llResetScript();
}
}
Last edited by Shandon Loring on Wed Oct 05, 2022 9:33 pm, edited 2 times in total.
These users thanked the author Shandon Loring for the post (total 2):
Ilan TochnerChris Namaste
Graham Mills
Posts: 1314
Joined: Sun Dec 23, 2012 2:26 pm
Has thanked: 1134 times
Been thanked: 1141 times

Re: Blinky Hover - not workie

Post by Graham Mills »

OpenSim has better taste? :twisted:
These users thanked the author Graham Mills for the post (total 2):
Shandon LoringChris Namaste
User avatar
Shandon Loring
Posts: 1341
Joined: Sat Oct 26, 2013 3:25 am
Has thanked: 961 times
Been thanked: 1581 times
Contact:

Re: Blinky Hover - not workie

Post by Shandon Loring »

and less filling!
These users thanked the author Shandon Loring for the post (total 2):
Graham MillsChris Namaste
Graham Mills
Posts: 1314
Joined: Sun Dec 23, 2012 2:26 pm
Has thanked: 1134 times
Been thanked: 1141 times

Re: Blinky Hover - not workie

Post by Graham Mills »

This "works"

Code: Select all

default
{
state_entry()
{
llSetText(" \n👆\n \n ", <1.00,0.0,0.0>, 1);
llSleep (0.5);
llSetText(" \n👆\n \n ", <0.00,1.0,0.0>, 1);
llSleep (0.5);
state sub;
}
}

state sub
{
    state_entry()
    {
        llResetScript();
    }
}
These users thanked the author Graham Mills for the post (total 2):
Shandon LoringIlan Tochner
User avatar
Shandon Loring
Posts: 1341
Joined: Sat Oct 26, 2013 3:25 am
Has thanked: 961 times
Been thanked: 1581 times
Contact:

Re: Blinky Hover - not workie

Post by Shandon Loring »

cool! thank you Graham...
must be some peculiarity in OS scripting vs Linden scripting for ResetScript
one of those mysteries we'll never know! LoL

but hey... Results!! Works is Works!

ty sir!!
These users thanked the author Shandon Loring for the post:
Graham Mills
Graham Mills
Posts: 1314
Joined: Sun Dec 23, 2012 2:26 pm
Has thanked: 1134 times
Been thanked: 1141 times

Re: Blinky Hover - not workie

Post by Graham Mills »

Another version not using llSleep.

Code: Select all

integer FLAG;

default
{
    state_entry()
    {
        FLAG = 0;
        llSetTimerEvent(10.0);
    }
    
    timer()
    {
        if (FLAG == 0)
        {
            llSetText("OFF", <1,0,0>, 1);
            FLAG = 1;
        }
        else
        {
            llSetText("ON", <0,1,0>, 1);
            FLAG = 0;
        }
    }
}
These users thanked the author Graham Mills for the post (total 2):
Shandon LoringIlan Tochner
Post Reply