Jump to content

Stop llGetUnixTime when it reach a certain float


Cindy Kraai
 Share

You are about to reply to a thread that has been inactive for 2802 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

integer Count;
default
{
    state_entry()
    {
        Count = llGetUnixTime();
        if(Count < 10){
            llSetTimerEvent(0);
            }
        else 
        llSetTimerEvent(0.1);
    }
 
    timer()
    {
        llSetText((string)(llGetUnixTime() - Count) + " Seconds!\n\n ", <1,0,0>, 1.0);
        
    }
}

im not really sure how it works but the idea is as soon as the script runs it will start counting via text and when it reaches a certain number it will stop. Can someone help me with this pls, thanks in advance

Link to comment
Share on other sites

Looks like your trying to count up to 10 seconds

In which case I would use llResetTime and LLGetTime

 

integer Count;default{    state_entry()    {        llResetTime();        llSetTimerEvent(0.1);    }     timer()    {        Count = (integer)llGetTime();		if ( Count <= 10)		{			llSetText((string)Count + " Seconds!\n\n ", <1,0,0>, 1.0);		}		else		{			llSetTimerEvent(0.0);		}            }}

(Edited to fix syntax errors and typos)

 

 

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2802 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...