Drag[en]gine Script Module DragonScript
1.23
|
Behavior instance. More...
Classes | |
class | LeaveConversation |
Public Member Functions | |
void | addListener (Listener listener) |
Add listener. More... | |
void | cancelAligning () |
Cancel aligning if running. More... | |
void | clearTarget () |
Clear target parameters. More... | |
void | dispose () |
Dispose of behavior instance. More... | |
void | enterFrame () |
Frame update started. More... | |
ECBehaviorConversationActor.Instance | getConversationActor () |
Conversation actor behavior or null if not used. More... | |
ECBehaviorAlignActor | getECBehavior () |
Behavior. More... | |
ECBehaviorLocomotion.Instance | getLocomotion () |
Locomotion behavior. More... | |
ConversationPlaybackLookAt | getLookAt () |
Conversation look-at. More... | |
Element | getRelativeTargetElement () |
Relative target element. More... | |
DMatrix | getRelativeTargetMatrix () |
Relative target matrix. More... | |
float | getSpeed () |
Movement speed. More... | |
float | getTargetLookVertical () |
Target looking up-down. More... | |
float | getTargetOrientation () |
Target orientation. More... | |
DVector | getTargetPosition () |
Target position. More... | |
float | getWorldTargetOrientation () |
World target orientation. More... | |
DVector | getWorldTargetPosition () |
World target position. More... | |
bool | hasFailed () |
Last aligning failed. More... | |
bool | hasSucceeded () |
Last aligning succeeded. More... | |
void | init (StubElement stub) |
Initialize behavior from stub. More... | |
bool | isAligning () |
Actor is aligning. More... | |
bool | isAtTarget () |
Actor is at target position. More... | |
bool | isFinished () |
Actor is not aligning. More... | |
bool | isNotAtTarget () |
Actor is not at target position. More... | |
Instance | new (ECBehaviorAlignActor ecbehavior, BehaviorElement element) |
Create behavior instance. More... | |
void | readFromFile (PersistencyEnvironment env, FileReader reader) |
Read behavior from file. More... | |
void | removeListener (Listener listener) |
Remove listener. More... | |
void | setLookAt (ConversationPlaybackLookAt lookAt) |
Set conversation look-at. More... | |
void | setLookAt (DVector lookAt) |
Set conversation look-at from world position. More... | |
void | setRelativeTargetElement (Element element) |
Set relative target position. More... | |
void | setSpeed (float speed) |
Set movement speed. More... | |
void | setTarget (Element element, DVector position, float orientation) |
Set target. More... | |
void | setTargetFromLocomotion () |
Set target from locomotion. More... | |
void | setTargetLookVertical (float lookVertical) |
Set target looking up-down. More... | |
void | setTargetOrientation (DVector targetPosition) |
Set target orientation. More... | |
void | setTargetOrientation (float orientation) |
Set target orientation. More... | |
void | setTargetPosition (DVector position) |
Set target position. More... | |
void | startAligning () |
Start aligning actor. More... | |
void | think (float elapsed) |
Think about what to do for the next frame update. More... | |
void | update (float elapsed) |
Update aligning. More... | |
Public Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance | |
void | addToGameWorld () |
Add element to game world. More... | |
void | attachToParent (Element parent) |
Attach element to object set by the mapper in the IGDE World Editor. More... | |
void | geometryChanged () |
Position or orientation changed. More... | |
BehaviorElement | getElement () |
Behavior element to apply behavior to. More... | |
int | getInstanceIndex () |
Behavior instance index. More... | |
DefaultECBehaviorInstance | new (BehaviorElement element) |
Create default composeable instance. More... | |
void | postThink (float elapsed) |
Post thinking after physics processing is finished. More... | |
void | removeFromGameWorld () |
Remove element from game world. More... | |
bool | requiresEnterFrame () |
Behavior instance requires enterFrame() to be called. More... | |
bool | requiresThink () |
Behavior instance requires think() to be called. More... | |
void | stateChanged () |
State changed (visble, touchable). More... | |
void | writeToFile (PersistencyEnvironment env, FileWriter writer) |
Write behavior instance to file. More... | |
Public Attributes | |
bool | pAlignFinished |
ECBehaviorConversationActor.Instance | pConversationActor |
ECBehaviorAlignActor | pECBehavior |
ElementResolver | pElementResolver |
float | pInitialDistance |
bool | pIsAtTarget |
Array | pListeners |
ECBehaviorLocomotion.Instance | pLocomotion |
ConversationPlaybackLookAt | pLookAt |
Element | pRelativeTargetElement |
DMatrix | pRelativeTargetMatrix |
float | pSpeed |
bool | pSucceeded |
float | pTargetLookVertical |
float | pTargetOrientation |
DVector | pTargetPosition |
Protected Member Functions | |
void | checkFinished () |
Check if actor finished aligning. More... | |
Protected Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance | |
void | setRequiresEnterFrame (bool required) |
Set if behavior instance requires enterFrame() to be called. More... | |
void | setRequiresThink (bool required) |
Set if behavior instance requires think() to be called. More... | |
Behavior instance.
void Dragengine.Scenery.ECBehaviorAlignActor.Instance.addListener | ( | Listener | listener | ) |
Add listener.
void Dragengine.Scenery.ECBehaviorAlignActor.Instance.cancelAligning | ( | ) |
Cancel aligning if running.
|
protected |
Check if actor finished aligning.
Sets pIsAtTarget to true if all required conditions are fulfilled.
void Dragengine.Scenery.ECBehaviorAlignActor.Instance.clearTarget | ( | ) |
Clear target parameters.
void Dragengine.Scenery.ECBehaviorAlignActor.Instance.dispose | ( | ) |
Dispose of behavior instance.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
void Dragengine.Scenery.ECBehaviorAlignActor.Instance.enterFrame | ( | ) |
Frame update started.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
ECBehaviorConversationActor.Instance Dragengine.Scenery.ECBehaviorAlignActor.Instance.getConversationActor | ( | ) |
Conversation actor behavior or null if not used.
ECBehaviorAlignActor Dragengine.Scenery.ECBehaviorAlignActor.Instance.getECBehavior | ( | ) |
Behavior.
ECBehaviorLocomotion.Instance Dragengine.Scenery.ECBehaviorAlignActor.Instance.getLocomotion | ( | ) |
Locomotion behavior.
ConversationPlaybackLookAt Dragengine.Scenery.ECBehaviorAlignActor.Instance.getLookAt | ( | ) |
Conversation look-at.
Element Dragengine.Scenery.ECBehaviorAlignActor.Instance.getRelativeTargetElement | ( | ) |
Relative target element.
DMatrix Dragengine.Scenery.ECBehaviorAlignActor.Instance.getRelativeTargetMatrix | ( | ) |
Relative target matrix.
float Dragengine.Scenery.ECBehaviorAlignActor.Instance.getSpeed | ( | ) |
Movement speed.
float Dragengine.Scenery.ECBehaviorAlignActor.Instance.getTargetLookVertical | ( | ) |
Target looking up-down.
float Dragengine.Scenery.ECBehaviorAlignActor.Instance.getTargetOrientation | ( | ) |
Target orientation.
DVector Dragengine.Scenery.ECBehaviorAlignActor.Instance.getTargetPosition | ( | ) |
Target position.
float Dragengine.Scenery.ECBehaviorAlignActor.Instance.getWorldTargetOrientation | ( | ) |
World target orientation.
If relative to element this potentially changes every frame update.
DVector Dragengine.Scenery.ECBehaviorAlignActor.Instance.getWorldTargetPosition | ( | ) |
World target position.
If relative to element this potentially changes every frame update.
bool Dragengine.Scenery.ECBehaviorAlignActor.Instance.hasFailed | ( | ) |
Last aligning failed.
bool Dragengine.Scenery.ECBehaviorAlignActor.Instance.hasSucceeded | ( | ) |
Last aligning succeeded.
void Dragengine.Scenery.ECBehaviorAlignActor.Instance.init | ( | StubElement | stub | ) |
Initialize behavior from stub.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
bool Dragengine.Scenery.ECBehaviorAlignActor.Instance.isAligning | ( | ) |
Actor is aligning.
bool Dragengine.Scenery.ECBehaviorAlignActor.Instance.isAtTarget | ( | ) |
Actor is at target position.
bool Dragengine.Scenery.ECBehaviorAlignActor.Instance.isFinished | ( | ) |
Actor is not aligning.
bool Dragengine.Scenery.ECBehaviorAlignActor.Instance.isNotAtTarget | ( | ) |
Actor is not at target position.
Instance Dragengine.Scenery.ECBehaviorAlignActor.Instance.new | ( | ECBehaviorAlignActor | ecbehavior, |
BehaviorElement | element | ||
) |
Create behavior instance.
void Dragengine.Scenery.ECBehaviorAlignActor.Instance.readFromFile | ( | PersistencyEnvironment | env, |
FileReader | reader | ||
) |
Read behavior from file.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
void Dragengine.Scenery.ECBehaviorAlignActor.Instance.removeListener | ( | Listener | listener | ) |
Remove listener.
void Dragengine.Scenery.ECBehaviorAlignActor.Instance.setLookAt | ( | ConversationPlaybackLookAt | lookAt | ) |
Set conversation look-at.
void Dragengine.Scenery.ECBehaviorAlignActor.Instance.setLookAt | ( | DVector | lookAt | ) |
Set conversation look-at from world position.
Shortcut for calling setLookAt() with ConversationPlaybackLookAt using ConversationCustomTarget with matrix set from world position.
void Dragengine.Scenery.ECBehaviorAlignActor.Instance.setRelativeTargetElement | ( | Element | element | ) |
Set relative target position.
void Dragengine.Scenery.ECBehaviorAlignActor.Instance.setSpeed | ( | float | speed | ) |
Set movement speed.
void Dragengine.Scenery.ECBehaviorAlignActor.Instance.setTarget | ( | Element | element, |
DVector | position, | ||
float | orientation | ||
) |
Set target.
void Dragengine.Scenery.ECBehaviorAlignActor.Instance.setTargetFromLocomotion | ( | ) |
Set target from locomotion.
void Dragengine.Scenery.ECBehaviorAlignActor.Instance.setTargetLookVertical | ( | float | lookVertical | ) |
Set target looking up-down.
void Dragengine.Scenery.ECBehaviorAlignActor.Instance.setTargetOrientation | ( | DVector | targetPosition | ) |
Set target orientation.
void Dragengine.Scenery.ECBehaviorAlignActor.Instance.setTargetOrientation | ( | float | orientation | ) |
Set target orientation.
void Dragengine.Scenery.ECBehaviorAlignActor.Instance.setTargetPosition | ( | DVector | position | ) |
Set target position.
void Dragengine.Scenery.ECBehaviorAlignActor.Instance.startAligning | ( | ) |
Start aligning actor.
Before calling set the required parameters using setTarget*(). As long as the aligning is running no modification on ECBehaviorLocomotion should be done to not cause troubles. Once isAligning() returns false or isFinished() returns true the locomotion can be modified again. Calls startAligning() on listeners. Once finished calls finishedAligning() on listeners.
This call modifies some locomotion parameters which are required for this behavior to work properly. Sets CanTurnInPlace to false and CanTurn to true. All other locomotion parameters are not modified. For player actors certain locomotion parameters should be changed otherwise it can look strange or even discomforting. Call initLocomotionPlayer() to set suitable locomotion parameters for player controlled actors.
EInvalidParam | Actor is already aligning. |
void Dragengine.Scenery.ECBehaviorAlignActor.Instance.think | ( | float | elapsed | ) |
Think about what to do for the next frame update.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
void Dragengine.Scenery.ECBehaviorAlignActor.Instance.update | ( | float | elapsed | ) |
Update aligning.
Called by think(). While isAligning() returns true do not update locomotion using ECBehaviorPlayerInput* or other behaviors. After this call returns you can check if isAligning() still returns true. If isAligning() returns false aligning finished and you can resume updating locomotions. You can also use listeners to be notified if aligning finished or has been cancelled. It is recommended to clear all ECBehaviorPlayerInput* once finished to ensure player input did not build up.
bool Dragengine.Scenery.ECBehaviorAlignActor.Instance.pAlignFinished |
ECBehaviorConversationActor.Instance Dragengine.Scenery.ECBehaviorAlignActor.Instance.pConversationActor |
ECBehaviorAlignActor Dragengine.Scenery.ECBehaviorAlignActor.Instance.pECBehavior |
ElementResolver Dragengine.Scenery.ECBehaviorAlignActor.Instance.pElementResolver |
float Dragengine.Scenery.ECBehaviorAlignActor.Instance.pInitialDistance |
bool Dragengine.Scenery.ECBehaviorAlignActor.Instance.pIsAtTarget |
Array Dragengine.Scenery.ECBehaviorAlignActor.Instance.pListeners |
ECBehaviorLocomotion.Instance Dragengine.Scenery.ECBehaviorAlignActor.Instance.pLocomotion |
ConversationPlaybackLookAt Dragengine.Scenery.ECBehaviorAlignActor.Instance.pLookAt |
Element Dragengine.Scenery.ECBehaviorAlignActor.Instance.pRelativeTargetElement |
DMatrix Dragengine.Scenery.ECBehaviorAlignActor.Instance.pRelativeTargetMatrix |
float Dragengine.Scenery.ECBehaviorAlignActor.Instance.pSpeed |
bool Dragengine.Scenery.ECBehaviorAlignActor.Instance.pSucceeded |
float Dragengine.Scenery.ECBehaviorAlignActor.Instance.pTargetLookVertical |
float Dragengine.Scenery.ECBehaviorAlignActor.Instance.pTargetOrientation |
DVector Dragengine.Scenery.ECBehaviorAlignActor.Instance.pTargetPosition |