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


{|style="width:85%; text-align:left; vertical-align:top; border:1px solid #cedff2" cellspacing="0" cellpadding="5"
  [ ] reorganize ofp section
|-
[ ] maybe introduce new category "Reference Lists" for lists like actions, EHs, configs?
|colspan="3" style="background:#f5faff; border-bottom:1px solid #cedff2; font-size:1.2em; font-weight:bold; color:#6191C3"|Dependencies
[ ] extend getting started in bi wikiing page - reading
|-
!style="width:100px"|Game:
|colspan="2"|Operation Flashpoint
|-
!Game Version:
|colspan="2"|1.00
|-
|colspan="3" style="background:#f5faff; border-top:1px solid #cedff2; border-bottom:1px solid #cedff2; font-size:1.2em; font-weight:bold; color:#6191C3"|Description
|-
!style="vertical-align:top"|Description:
|colspan="2"|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.
|-
|colspan="3" style="background:#f5faff; border-top:1px solid #cedff2; border-bottom:1px solid #cedff2; font-size:1.2em; font-weight:bold; color:#6191C3"|Usage
|-
!style="vertical-align:top"|Syntax:
|colspan="2"|unit '''addEventHandler''' [type, code]
|-
!style="vertical-align:top; background:#FAFAFA"|Parameters:
|style="width:100px; background:#FAFAFA"|''unit'': [[Object]]
|style="background:#FAFAFA"|
|-
|style="background:#FAFAFA"|
|style="background:#FAFAFA"|''type'': [[String]]
|style="background:#FAFAFA"|Event handler type
|-
|style="background:#FAFAFA"|
|style="background:#FAFAFA"|''code'': [[String]]
|style="background:#FAFAFA"|Code that should be executed once the event occurs
|-
!style="vertical-align:top"|Return Value:
|style="vertical-align:top"|[[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.
|-
!style="vertical-align:top"|Multiplayer:
|colspan="2" style="vertical-align:top"|Behaviour not known.
|-
|colspan="3" style="background:#f5faff; border-top:1px solid #cedff2; border-bottom:1px solid #cedff2; font-size:1.2em; font-weight:bold; color:#6191C3"|Examples
|-
!style="vertical-align:top"|Example 1:
|colspan="2" style="vertical-align:top"|<code>Code 1</code>
|-
!style="vertical-align:top"|Example 2:
|colspan="2" style="vertical-align:top"|<code>Code 2</code>
|-
|colspan="3" style="background:#f5faff; border-top:1px solid #cedff2; border-bottom:1px solid #cedff2; font-size:1.2em; font-weight:bold; color:#6191C3"|Additional Information
|-
!style="vertical-align:top"|See also:
|colspan="2" style="vertical-align:top"|'''[[removeEventHandler]]'''
|-
!style="vertical-align:top"|Attention:
|colspan="2" style="vertical-align:top"|This and that happens then and then.
|-
!style="vertical-align:top"|Bugs:
|colspan="2"|
* First bug
* Second bug
|}


Option 2:
<h2 class="sectionheader">Dependencies:</h2>
<dl><dt>Game:</dt><dd>Operation Flashpoint</dd>
<dt>Version:</dt><dd>1.00</dd></dl>
<h2 class="sectionheader">Description:</h2>
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.
<h2 class="sectionheader">Usage:</h2>
<dl>
<dt>Syntax:</dt><dd>unit '''addEventHandler''' [type, code]</dd>
<div class="param"><dt>Parameters:</dt><dd>unit: [[Object]]
type: [[String]] - Event handler type
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></div>
<dt>Multiplayer Behaviour:</dt><dd>Unknown.</dd></dl>
<h2 class="sectionheader">Examples:</h2>
<dl><dt>Example 1:</dt><dd><code>Code 1</code></dd>
<dt>Example 2:</dt><dd><code>Code 2</code></dd></dl>
<h2 class="sectionheader">Additional Information:</h2>
<dl><dt>See also:</dt><dd>'''[[removeEventHandler]]'''</dd>
<dt>Attention:</dt><dd>Not filled.</dd>
<dt>Bugs:</dt><dd>
* First
* Second
* Third
</dd></dl>


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

Latest revision as of 04: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