OpenSim.Region.ScriptEngine.XEngine.XEngine.PostScriptEvent C# (CSharp) Method

PostScriptEvent() public method

Post an event to a single script
public PostScriptEvent ( UUID itemID, EventParams p ) : bool
itemID UUID
p EventParams
return bool
        public bool PostScriptEvent(UUID itemID, EventParams p)
        {
            if (m_Scripts.ContainsKey(itemID))
            {
                IScriptInstance instance = m_Scripts[itemID];
                if (instance != null)
                    instance.PostEvent(p);
                return true;
            }
            return false;
        }

Same methods

XEngine::PostScriptEvent ( UUID itemID, string name, Object p ) : bool

Usage Example

        // timer: not handled here
        // listen: not handled here

        public void control(UUID itemID, UUID agentID, uint held, uint change)
        {
            myScriptEngine.PostScriptEvent(itemID, new EventParams(
                                               "control", new object[] {
                new LSL_Types.LSLString(agentID.ToString()),
                new LSL_Types.LSLInteger(held),
                new LSL_Types.LSLInteger(change)
            },
                                               new DetectParams[0]));
        }