|
Maxx Bourne
Registered User
Join date: 8 May 2007
Posts: 5
|
12-26-2008 15:44
Im a complete newb scriptor.. what am I doing wrong here? ************************************** string region; string sim; string agent default { state_entry() { llSetTimerEvent(1.0); } timer() { string here = llGetRegionName(); if(region != here) { sim = llGetSimulatorHostname(); region = here; } llSetText( " REGION NAME : " + region + "\n SIM HOSTNAME : " + sim + "\n TIME DILATION : " + (string)llGetRegionTimeDilation() + "\n REGION FPS : " + (string)llGetRegionFPS() + "\n Number of people in Sim : " + (string)llGetRegionAgentCount(), <0,1,0>, 1.0); } } ***********************************************************************
|
|
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
|
12-26-2008 16:43
That's an extremely aggressive timer (1 second) when you consider that the delay on llGetSimulatorHostName() is something like 10 seconds.
If you don't call that function, call it once only at any region change, or change the timer to 60 seconds you'll probably get better results.
/esc
_____________________
http://slurl.com/secondlife/Together
|
|
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
|
12-26-2008 16:49
Oh not wait - you did that.
it does look like you are missing a semicolon after string agent you should probably remove that line as it's not used anyhow...
_____________________
http://slurl.com/secondlife/Together
|
|
Maxx Bourne
Registered User
Join date: 8 May 2007
Posts: 5
|
12-26-2008 21:18
missing semi-colon.. heh thanks fixed that an it compiles now, however it wont output to text number of Agents in sim; ******************** llSetText( " REGION NAME : " + region + "\n SIM HOSTNAME : " + sim + "\n TIME DILATION : " + (string)llGetRegionTimeDilation() + "\n REGION FPS : " + (string)llGetRegionFPS() + "\n Number of people in Sim : " + (string)llGetRegionAgentCount(), <0,1,0>, 1.0); ********************* I get everything except the agent count, the line of text "Number of people in Sim" doesnt even show up
|
|
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
|
12-26-2008 21:31
Once/second is still too fast, IMO.. Does it really need to update that quickly?
An llSetText will trigger a full object update. You should really do this less often or at least have a global string that contains the text and don't bother updating it unless it's changed..
|
|
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
|
12-26-2008 22:03
It's working for me.
"Number of people in sim" and the count both show up.
_____________________
-
So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.
I can be found on the web by searching for "SuezanneC Baskerville", or go to
http://www.google.com/profiles/suezanne
-
http://lindenlab.tribe.net/ created on 11/19/03.
Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard, Robin, and Ryan
-
|