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)
 
(120 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:#0033CC"|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:#0033CC"|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:#0033CC"|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:#0033CC"|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:#0033CC"|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:
== Dependencies ==
{| cellspacing="0" cellpadding="5" style="text-align:left"
! style="width:100px" | Game:
| Operation Flashpoint
|-
! Version:
| 1.00
|}
== Description ==
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.
== Usage ==
{| cellspacing="0" cellpadding="5" style="text-align:left"
! style="width:100px" | Syntax:
| unit '''addEventHandler''' [type, code]
|-
! Parameters:
|
|-
! Return Value:
|
|-
! Multiplayer:
| Behaviour unknown.
|}
== Examples ==
{| cellspacing="0" cellpadding="5" style="text-align:left"
! style="width:100px" | Example 1:
| <code>Code 1</code>
|-
! Example 2:
| <code>Code 2</code>
|}
== Additional Information ==
{| cellspacing="0" cellpadding="5" style="text-align:left"
! style="width:100px" | Attention:
|
|-
! Bugs:
|
|}


[[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