Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llSetScriptState

TwelveOclock Ramos
Registered User
Join date: 1 Feb 2004
Posts: 1
05-12-2005 20:56
I'm new scripting so bear with. ;-)

According to the Wiki the llSetScriptState will only turn on a script that has been turned off by the same command.

What i'm trying to do is make a puzzle game that would have a script for each level. I would like to be able to have a control script that would keep track of non puzzle related things, as well as the level number that the puzzle should be on. I'm thinking if i was able to get that control script to turn off all the puzzles and then only turn on the script that the current puzzle is on.

Is there a way around the whole llSetScriptState deal? If i were to get all the scripts to turn themselves off on rez, and then have the control script turn on the puzzle that is need woudl that work? Any suggestions? :confused:
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
05-12-2005 21:35
Yep! Try real states:

http://secondlife.com/badgeo/wakka.php?wakka=State
_____________________
---
Legith Fairplay
SL Scripter
Join date: 14 Jul 2004
Posts: 189
05-12-2005 21:44
can't say I've used the call.. but it looks to me as if the scripts that you want to start/stop can start running when you compile them, then stop themselves.. then just continue as you have planed..

I just checked this in world
CODE

default{
state_entry(){
llSetScriptState(llGetScriptName(), FALSE);
llSleep(1); //stopping of script isn't instant
state main;
}
}
state main{
// put code here not in default
}


But as Jeffery just mentioned.. you might just want 2 scripts.. one handles common elements, and another that handles all levels with states, not separate scripts.. but that depends on what you are making.
_____________________
Butterflies and other creations at:
Legith's Island Park Lozi(44,127)
And on slexchange.com