Difference between revisions of "SignalEvent"

From NWN Lexicon
Jump to: navigation, search
m (Protected "SignalEvent" ([Edit=Allow only administrators] (indefinite)) [cascading])
m (Wikified article formatting and cleaned up grammar)
Line 1: Line 1:
 
 
 
 
=SignalEvent(object, event)=
 
 
 
Causes an object to fire a specified event.
 
Causes an object to fire a specified event.
  
Line 14: Line 8:
 
</nwscript>
 
</nwscript>
  
====Parameters====
+
===Parameters===
 
+
; oObject
''oObject''
+
: The Object you want to have run an event.
 
 
The Object you want to have run an event.
 
 
 
''evToRun''
 
 
 
The event to have the object run. Must be constructed using one of the event functions.
 
 
 
<br />
 
  
====Description====
+
; evToRun
 +
: The event to have the object run. Must be constructed using one of the event functions.
  
Causes oObject to run evToRun. Allows objects to fire off events in other objects. The events you can run include the default events provided by Bioware as well as user defined events the object has scripted. The event parameter must be an actual event created by one of the many event functions.
+
===Description===
 +
Causes oObject to run evToRun. Allows objects to fire off events in other objects. The events you can run include the default events provided by BioWare as well as user defined events the object has scripted. The event parameter must be an actual event created by one of the many event functions.
  
<br /><br />
+
===Remarks===
 +
The only events which are valid are:
 +
* [[EventActivateItem]](): calls a modules Activate Item script.
 +
* [[EventConversation]](): which calls an objects conversation script.
 +
* [[EventSpellCastAt]](): fires an objects On Spell Cast At script.
 +
* [[EventUserDefined]](): fires an object/module/area's User Defined Event script.
  
====Remarks====
+
They could be defined, but it is more likely they are put directly into the SignalEvent(), like the example below.
 
 
The only events which are valid are: <br /> - EventActivateItem(), which calls a modules Activate Item script. <br /> - EventConversation(), which calls an objects conversation script. <br /> - EventSpellCastAt(), which fires an objects On Spell Cast At script. <br /> - EventUserDefined(), which fires an object/module/area's User Defined Event script. <br /><br /> They could be defined, but it is more likely they are put directly into the SignalEvent, like the example below.
 
 
 
<br />
 
 
 
====Version====
 
  
 +
===Version===
 
1.64
 
1.64
  
====Example====
+
===Example===
  
 
<nwscript>
 
<nwscript>
// Fire the modules event 100, which could trigger some event such as a cutseen.
+
// Fire the modules event 100, which could trigger some event such as a cutscene.
 
void main()
 
void main()
 
{
 
{
 
     // Get the module
 
     // Get the module
 
     object oModule = GetModule();
 
     object oModule = GetModule();
 +
 
     // Signal the user defined event
 
     // Signal the user defined event
 
     SignalEvent(oModule, EventUserDefined(100));
 
     SignalEvent(oModule, EventUserDefined(100));
Line 55: Line 44:
 
</nwscript>
 
</nwscript>
  
====See Also====
+
===See Also===
  
 
{| class="seealso"
 
{| class="seealso"
 
| width="1px" align="right" valign="top" | <font color="gray">functions: </font>
 
| width="1px" align="right" valign="top" | <font color="gray">functions: </font>
|
+
|[[EventUserDefined|EventUserDefined]]
[[ EventUserDefined | EventUserDefined ]]
 
 
|-
 
|-
 
|}
 
|}
  
<br />
 
 
----
 
----
<font color="gray">  author: John Shuell, editor: Jasperre, additional contributor(s): Darrell Knapp</font><br />  <br />
+
<font color="gray">  author: John Shuell, editor: Jasperre, additional contributor(s): Darrell Knapp</font>
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:Miscellaneous_Functions]]
+
[[Category:Miscellaneous_Functions]]{{DISPLAYTITLE:SignalEvent(object, event)}}

Revision as of 00:00, 11 April 2018

Causes an object to fire a specified event.

void SignalEvent(
    object oObject,
    event evToRun
);

Parameters

oObject
The Object you want to have run an event.
evToRun
The event to have the object run. Must be constructed using one of the event functions.

Description

Causes oObject to run evToRun. Allows objects to fire off events in other objects. The events you can run include the default events provided by BioWare as well as user defined events the object has scripted. The event parameter must be an actual event created by one of the many event functions.

Remarks

The only events which are valid are:

They could be defined, but it is more likely they are put directly into the SignalEvent(), like the example below.

Version

1.64

Example

// Fire the modules event 100, which could trigger some event such as a cutscene.
void main()
{
    // Get the module
    object oModule = GetModule();
 
    // Signal the user defined event
    SignalEvent(oModule, EventUserDefined(100));
}

See Also

functions:  EventUserDefined

 author: John Shuell, editor: Jasperre, additional contributor(s): Darrell Knapp