User Tools

Site Tools


building:scripts:events:variable_based

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
building:scripts:events:variable_based [2019/03/11 04:41]
Mavrixio
building:scripts:events:variable_based [2023/11/30 21:05] (current)
ItsABadger
Line 1: Line 1:
-====== Variable Based Events ======+====== ​PAGE INFO ALREADY TRANSFERRED TO THE NEW WIKI - Variable Based Events ======
 Those events will run only run for a specific object so they are optimal and should be your preferred way to register an event. Those events will run only run for a specific object so they are optimal and should be your preferred way to register an event.
  
Line 19: Line 19:
 ===== Accessing the Parameters ===== ===== Accessing the Parameters =====
   - The registered scripts will run in the same context as the calling script so for example: EVENT_USE is called by [[https://​nwn.sinfar.net/​res_nss_edit.php?​name=pc_ev_useitem|pc_ev_useitem]] so you can still get the item with GetEventParamObject(0).   - The registered scripts will run in the same context as the calling script so for example: EVENT_USE is called by [[https://​nwn.sinfar.net/​res_nss_edit.php?​name=pc_ev_useitem|pc_ev_useitem]] so you can still get the item with GetEventParamObject(0).
-  - A variable event can also have its own parameters, they can be accessed with the following ​methods ​<​code>​ +  - A variable event can also have its own parameters, they can be accessed with the following ​functions: ​<​code>​ 
-array GetCurrentVariableEventParams();</​code>​ +array GetCurrentVariableEventParams();​ 
-  - You can get the object on which the variable event was registered (it may not be the caller) and the currently running variable event (in case that you decide to register the same script to many events) with the following functions:<​code>​object GetCurrentVariableEventTarget();​+</​code>​ 
 +  - You can get the object on which the variable event was registered (it may not be the caller) and the currently running variable event (in case that you decide to register the same script to many events) with the following functions: <​code>​object GetCurrentVariableEventTarget();​
 string GetCurrentVariableEvent();</​code> ​ string GetCurrentVariableEvent();</​code> ​
  
building/scripts/events/variable_based.1552279319.txt.gz · Last modified: 2019/03/11 04:41 by Mavrixio

phpBB Appliance - Powered by TurnKey Linux