Hardrock/Sandbox – User

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
Option 1:
{|style="width:75%; text-align:left; vertical-align:top;  border:1px solid #cedff2" cellspacing="0" cellpadding="5"
{|style="width:75%; text-align:left; vertical-align:top;  border:1px solid #cedff2" cellspacing="0" cellpadding="5"
|-
|-
|colspan="3" style="background:#f5faff; border-bottom:1px solid #cedff2; font-size:1.2em; font-weight:bold; color:#0033CC"|Game Version
|colspan="3" style="background:#f5faff; border-bottom:1px solid #cedff2; font-size:1.2em; font-weight:bold; color:#0033CC"|Dependencies
|-
|-
!style="width:100px"|Game:
!style="width:100px"|Game:
|colspan="2"|Operation Flashpoint
|colspan="2"|Operation Flashpoint
|-
|-
!Version
!Game Version:
|colspan="2"|1.00
|colspan="2"|1.00
|-
|-
Line 17: Line 19:
|-
|-
!style="vertical-align:top"|Syntax:
!style="vertical-align:top"|Syntax:
|colspan="2"|<code>unit addEventHandler [type, code]</code>
|colspan="2"|unit '''addEventHandler''' [type, code]
|-
|-
!style="vertical-align:top"|Parameters:
!style="vertical-align:top"|Parameters:
|unit: ''[[Object]]''
|''unit'': [[Object]]
|-
|-
|
|
|type: ''[[String]]''
|''type'': [[String]]
|event handler type
|Event handler type
|-
|-
|
|
|code: ''[[String]]''
|''code'': [[String]]
|code that should be executed once the event occurs
|Code that should be executed once the event occurs
|-
|-
!style="vertical-align:top"|Return value:
!style="vertical-align:top"|Return Value:
|style="vertical-align:top"|''[[Integer]]''
|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.
|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:
!style="vertical-align:top"|Multiplayer:
|colspan="2"|Not known.
|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
|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:
!style="vertical-align:top"|Example 1:
|<code>Code</code>
|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
|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"|Attention:
|colspan="2" style="vertical-align:top"|This and that happens then and then.
|-
|-
!style="vertical-align:top"|Bugs:
!style="vertical-align:top"|Bugs:
|colspan="2"|None known.
|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]]

Revision as of 22:25, 26 July 2006

Option 1:
Dependencies
Game: Operation Flashpoint
Game Version: 1.00
Description
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
Syntax: unit addEventHandler [type, code]
Parameters: unit: Object
type: String Event handler type
code: String Code that should be executed once the event occurs
Return Value: 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.
Multiplayer: Behaviour not known.
Examples
Example 1: Code 1
Example 2: Code 2
Additional Information
Attention: This and that happens then and then.
Bugs:
  • First bug
  • Second bug


Option 2:

Dependencies

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

Syntax: unit addEventHandler [type, code]
Parameters:
Return Value:
Multiplayer: Behaviour unknown.

Examples

Example 1: Code 1
Example 2: Code 2

Additional Information

Attention:
Bugs: