LlResetOtherScript

From Second Life Wiki

Jump to: navigation, search

Template:Needs Translation/LSL/es Template:Needs Translation/LSL/el Template:Needs Translation/LSL/he Template:Needs Translation/LSL/it Template:Needs Translation/LSL/ko Template:Needs Translation/LSL/nl Template:Needs Translation/LSL/hu Template:Needs Translation/LSL/no Template:Needs Translation/LSL/da Template:Needs Translation/LSL/sv Template:Needs Translation/LSL/tr Template:Needs Translation/LSL/pl Template:Needs Translation/LSL/pt Template:Needs Translation/LSL/ru Template:Needs Translation/LSL/uk Template:Needs Translation/LSL/zh-Hans Template:Needs Translation/LSL/zh-Hant

Contents

Summary

Function: llResetOtherScript( string name );
249 Function ID
0.0 Delay
10.0 Energy

Resets script name

• string name a script in the prim's inventory

On script reset...

  • The current event/function is exited without further execution or return.
  • All global variables are set to their defaults
  • The event queue is cleared, and recurring events are stopped.
  • The default state is set as the active state

Caveats

  • If name is missing from the prim's inventory or it is not a script then an error is shouted on DEBUG_CHANNEL.
  • If the script is not running, this call has no effect, even after the script is set running again.

Search JIRA for related Bugs

Examples

 
integer menu_channel = -2345;
 
default
{
	state_entry(){
		llListen(menu_channel, "", "", "");
	}
 
	touch_start(integer total_number){
		llDialog(llDetectedKey(0), "Reset database script?", ["Yes", "No"], menu_channel);
	}
 
	listen(integer channel, string name, key id, string message){
		if (message == "Yes"){
			llSay(0, "Reseting script...");
			llResetOtherScript("Database_script"); // The script must be in the same prim and does have to be running
		} else
			llSay(0, "Operation canceled");
	}	
}
 

See Also

Functions

•  llResetScript
•  llGetScriptState
•  llSetScriptState

Deep Notes

This article wasn't helpful for you? Maybe the related article at the LSL Wiki is able to bring enlightenment.
In other languages