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)
 
(76 intermediate revisions by 3 users not shown)
Line 1: Line 1:
__NOTOC__
== Notes to myself ==


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


{{test
|addEventHandler
|1.00
|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.
|[[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.
|p1=param1|p2=param2
}}
----
= Original =
== Dependencies ==
<dl>
<dt>Game:</dt><dd>Operation Flashpoint</dd>
<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>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
<code>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</code>
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</dd>
<dt>Example 2:</dt><dd><code>Code 2</code></dd>
</dl>
== Additional Information ==
<dl>
<dt>See also:</dt><dd>'''[[removeEventHandler]]'''</dd>
</dl>
== Notes ==
{{no-questions}}
<ol class="notes">
<li>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</li>
<li>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</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