From c2863df49d3bd1f4f7c2f4c17d897d9f66b36b26 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Thu, 17 Jan 2008 02:23:48 +0000 Subject: * Added and implemented the LSL changed event. * An example changed event syntax is at: http://opensimulator.org/wiki/Changed_Event_Example * You can use this to trigger actions in your script if someone sits on your object_rez * You can use this to figure out all of the CHANGED_ constants except for CHANGED_REGION, CHANGED_TELEPORT, and CHANGED_ALLOW_DROP --- .../Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase') diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs index 0a8f7ea..a32a132 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs @@ -68,10 +68,17 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase myScriptEngine.World.EventManager.OnObjectGrab += touch_start; myScriptEngine.World.EventManager.OnRezScript += OnRezScript; myScriptEngine.World.EventManager.OnRemoveScript += OnRemoveScript; + myScriptEngine.World.EventManager.OnScriptChangedEvent += changed; // TODO: HOOK ALL EVENTS UP TO SERVER! } } + public void changed(uint localID, uint change) + { + // Add to queue for all scripts in localID, Object pass change. + myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID,"changed", new object[] {(int) change}); + } + public void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) { // Add to queue for all scripts in ObjectID object -- cgit v1.1