Hardrock/Sandbox – User

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Erentar moved page Hardrock's Sandbox to User:Hardrock/Sandbox: Bot: Moved page)
 
(92 intermediate revisions by 3 users not shown)
Line 1: Line 1:
__NOTOC__
== Notes to myself ==
<div class="command_description">


== Dependencies ==
[ ] reorganize ofp section
<dl>
[ ] maybe introduce new category "Reference Lists" for lists like actions, EHs, configs?
<dt>Game:</dt><dd>Operation Flashpoint</dd>
[ ] extend getting started in bi wikiing page - reading
<dt>Version:</dt><dd>1.00</dd>
</dl>


== Description ==
<dl>
<dt>Description:</dt><dd>Adds an event handler to a given unit. For more information about event handlers and their types check the scripting topic Event Handlers in this reference. You may add as many event handlers of any type as you like to every unit, if you add an event handler of type "killed" and there already exists one, the old one doesn't get overwritten. Use removeEventHandler to delete event handlers.</dd>
</dl>
== Usage ==
<dl>
<dt>Syntax:</dt>
<dd>unit '''addEventHandler''' [type, code]</dd>
<dt>Parameters:</dt>
<dd class="param">''unit'': [[Object]]</dd>
<dd class="param">''type'': [[String]] - Event handler type</dd>
<dd class="param">''code'': [[String]] - Code that should be executed once the event occurs</dd>
<dt>Return Value:</dt>
<dd>[[Integer]] - The index of the currently added event handler is returned. Indices start at 0 for each unit and increment with each added event handler.</dd>
<dt>Multiplayer:</dt>
<dd>Behaviour unknown.</dd>
</dl>
== Examples ==
<dl>
<dt>Example 1:</dt><dd><code>Code 1</code></dd>
<dt>Example 2:</dt><dd><code>Code 2</code></dd>
</dl>
== Additional Information ==
<dl>
<dt>See also:</dt><dd>'''[[removeEventHandler]]'''</dd>
</dl>
== Notes ==
<ol>
<li class="note">Note 1</li>
<li class="note">Note 2</li>
</ol>
</div>


[[Category:Sandbox]]
[[Category:Sandbox]]

Latest revision as of 03:00, 3 December 2018

Notes to myself

[ ] reorganize ofp section
[ ] maybe introduce new category "Reference Lists" for lists like actions, EHs, configs?
[ ] extend getting started in bi wikiing page - reading