#include <behaviorComponent_ScriptBinding.h>
Inherits DynamicConsoleMethodComponent.
Inherited by Scene, and SceneObject.
|
Boolean | addBehavior (BehaviorInstance bi) |
|
void | clearBehaviors () |
|
Boolean | connect (outputBehavior, inputBehavior, outputName, inputName) |
|
Boolean | disconnect (outputBehavior, inputBehavior, outputName, inputName) |
|
Integer | getBehavior (string BehaviorTemplateName) |
|
Integer | getBehaviorByIndex (int index) |
|
String | getBehaviorConnection (outputBehavior, outputName, connectionIndex) |
|
Integer | getBehaviorConnectionCount (outputBehavior, outputName) |
|
Integer | getBehaviorCount () |
|
Boolean | raise (outputBehavior, outputName, [deltaTime]) |
|
Boolean | removeBehavior (BehaviorInstance bi, [bool deleteBehavior=true]) |
|
Boolean | reOrder (BehaviorInstance inst, [int desiredIndex=0]) |
|
String | callOnBehaviors (methodName, argi) |
|
Boolean | addComponents (compObjName, compObjName2,...) |
|
Integer | getComponent (idx) |
|
Integer | getComponentCount () |
|
Boolean | isEnabled () |
|
Boolean | removeComponents (compObjName, compObjName2,...) |
|
void | setEnabled (enabled) |
|
void | assignFieldsFrom (SimObject) |
|
Integer | clone ([copyDynamicFields=false]?) |
|
void | delete () |
|
Integer | getId () |
|
void | setName (newName) |
|
String | getName () |
|
String | getClassNamespace () |
|
String | getSuperClassNamespace () |
|
void | setClassNamespace (nameSpace) |
|
void | setSuperClassNamespace () |
|
Boolean | isMethod (string methodName) |
|
String | call (methodName, [args] *) |
|
void | dumpClassHierarchy () |
|
void | dump () |
|
Boolean | isMemberOfClass (string classname) |
|
String | getClassName () |
|
String | getFieldValue (fieldName) |
|
Boolean | setFieldValue (fieldName, value) |
|
Boolean | setEditFieldValue (fieldName, value) |
|
Integer | getDynamicFieldCount () |
|
String | getDynamicField (index) |
|
Integer | getFieldCount () |
|
String | getField (int index) |
|
void | setProgenitorFile (file) |
|
String | getProgenitorFile () |
|
Integer | getType () |
|
String | getFieldType (fieldName) |
|
void | setInternalName (string InternalName) |
|
String | getInternalName () |
|
Boolean | isChildOfGroup (groupID) |
|
Integer | getGroup () |
|
Boolean | startTimer (callbackFunction, float timePeriod, [repeat]?) |
|
void | stopTimer () |
|
Boolean | isTimerActive () |
|
Integer | schedule (time, command, [arg] *) |
|
void | startListening (SimObject) |
|
void | stopListening (SimObject) |
|
void | addListener (SimObject) |
|
void | removeListener (SimObject) |
|
void | removeAllListeners () |
|
void | postEvent (String eventName, String data) |
|
Boolean | save (fileName, [selectedOnly]?) |
|
void | addFieldFilter (fieldName) |
|
void | removeFieldFilter (fieldName) |
|
◆ addBehavior()
Add a behavior to the object
- Parameters
-
bi | The behavior instance to add |
- Returns
- (bool success) Whether or not the behavior was successfully added
◆ clearBehaviors()
Clear all behavior instances
- Returns
- No return value
◆ connect()
Boolean connect |
( |
outputBehavior |
, |
|
|
inputBehavior |
, |
|
|
outputName |
, |
|
|
inputName |
|
|
) |
| |
Connects a behavior output to a behavior input.
- Parameters
-
outputBehavior | The behavior that owns the output. |
inputBehavior | The behavior that owns the input. |
outputName | The output name owned by the output behavior. |
inputName | The input name owned by the input behavior. |
- Returns
- (bool success) Whether the connection was successful or not.
◆ disconnect()
Boolean disconnect |
( |
outputBehavior |
, |
|
|
inputBehavior |
, |
|
|
outputName |
, |
|
|
inputName |
|
|
) |
| |
Connects a behavior output to a behavior input.
- Parameters
-
outputBehavior | The behavior that owns the output. |
inputBehavior | The behavior that owns the input. |
outputName | The output name owned by the output behavior. |
inputName | The input name owned by the input behavior. |
- Returns
- (bool success) Whether the disconnection was successful or not.
◆ getBehavior()
Integer getBehavior |
( |
string |
BehaviorTemplateName | ) |
|
gets a behavior
- Parameters
-
BehaviorTemplateName | The name of the template of the behavior instance you want |
- Returns
- (BehaviorInstance bi) The behavior instance you requested
◆ getBehaviorByIndex()
Integer getBehaviorByIndex |
( |
int |
index | ) |
|
Gets a particular behavior
- Parameters
-
index | The index of the behavior to get |
- Returns
- (BehaviorInstance bi) The behavior instance you requested
◆ getBehaviorConnection()
String getBehaviorConnection |
( |
outputBehavior |
, |
|
|
outputName |
, |
|
|
connectionIndex |
|
|
) |
| |
Gets a comma-delimited list of connections on the behavior output on the specified behavior.
- Parameters
-
outputBehavior | The behavior that owns the output. |
outputName | The output name owned by the output behavior. |
connectionIndex | The connection index. |
- Returns
- Returns a comma-delimited list of connections on the behavior output on the specified behavior of the format <OutputBehavior>,<InputBehavior>,<OutputName>,<InputName>.
◆ getBehaviorConnectionCount()
Integer getBehaviorConnectionCount |
( |
outputBehavior |
, |
|
|
outputName |
|
|
) |
| |
Gets the number of connections on the behavior output on the specified behavior.
- Parameters
-
outputBehavior | The behavior that owns the output. |
outputName | The output name owned by the output behavior. |
- Returns
- The number of connections on the behavior output on the specified behavior.
◆ getBehaviorCount()
Get the count of behaviors on an object
- Returns
- (int count) The number of behaviors on an object
◆ raise()
Boolean raise |
( |
outputBehavior |
, |
|
|
outputName |
|
|
) |
| |
Raise a signal on the behavior output on the specified behavior.
- Parameters
-
outputBehavior | The behavior that owns the output. |
outputName | The output name owned by the output behavior. |
[deltaTime] | Optional time-delta (ms) when the raise should occur. |
- Returns
- (bool success) Whether the signal raise was successful or not.
◆ removeBehavior()
- Parameters
-
bi | The behavior instance to remove |
deleteBehavior | Whether or not to delete the behavior |
- Returns
- (bool success) Whether the behavior was successfully removed
◆ reOrder()
- Parameters
-
inst | The behavior instance you want to reorder |
desiredIndex | The index you want the behavior instance to be reordered to |
- Returns
- (bool success) Whether or not the behavior instance was successfully reordered