Drag[en]gine Script Module DragonScript  1.23
Dragengine.Scenery.ECBehaviorInteractPrompt Class Reference

Behavior adding support to elements to show interact prompt to player. More...

Inheritance diagram for Dragengine.Scenery.ECBehaviorInteractPrompt:
Dragengine.Scenery.DefaultECBehavior Dragengine.Scenery.ECBehavior Dragengine.Scenery.BehaviorCompatiblePersistency

Classes

class  Instance
 Behavior instance. More...
 

Public Member Functions

ECPStringList getAlternativeCommands ()
 Alternative commands. More...
 
ECPStringList getBones ()
 List of bones to restrict the prompt to. More...
 
ECPString getCommand ()
 Command. More...
 
ECPUnicodeString getDescription ()
 Description. More...
 
ECPString getDescriptionTranslate ()
 Description translated by active language. More...
 
ECPBoolean getEnabled ()
 Prompt is enabled. More...
 
ECPImage getImage ()
 Image. More...
 
ECPFloat getMaximumDistance ()
 Maximum distance to show interact prompt for when looking at it. More...
 
ECPString getSettings ()
 Optional settings to modify custom prompt widget display. More...
 
ECPString getStyle ()
 Style. More...
 
TranslationManager getTranslationManager ()
 Translation manager or null. More...
 
ECPUnicodeString getVerb ()
 Verb. More...
 
ECPString getVerbTranslate ()
 Verb translated by active language. More...
 
ECPVideo getVideo ()
 Video. More...
 
Instance instance (BehaviorElement element)
 Get instance in element from owner element class. More...
 
ECBehaviorInteractPrompt new (BehaviorElementClass eclass)
 Create behavior element class. More...
 
ECBehaviorInteractPrompt new (BehaviorElementClass eclass, String id)
 Create default composeable behavior. More...
 
ECBehaviorInteractPrompt new (BehaviorElementClass eclass, String id, String subID)
 
ECBehaviorInteractPrompt new (BehaviorElementClass eclass, String id, String subID, String prefix)
 
void setTranslationManager (TranslationManager manager)
 Set translation manager or null. More...
 
- Public Member Functions inherited from Dragengine.Scenery.DefaultECBehavior
void assignInstanceIndex (int instanceIndex)
 Assign instance index. More...
 
void dispose ()
 Dispose of behavior. More...
 
String getBehaviorID ()
 Unique identifier of behavior. More...
 
String getID ()
 Identifier. More...
 
int getInstanceIndex ()
 Instance index. More...
 
void loadSupportedData (String identifier, PersistencyEnvironment env, FileReader reader, ECBehaviorInstance instance)
 Load instance data of another behavior. More...
 
bool supportsBehaviorID (String identifier)
 Behavior supports loading instance data of another behavior. More...
 
- Public Member Functions inherited from Dragengine.Scenery.ECBehavior
ECBehaviorInstance createInstance (BehaviorElement element)
 Create Behavior instance. More...
 

Static Public Member Functions

static ECBehaviorInteractPrompt getBehaviorIn (BehaviorElementClass eclass)
 Get behavior in element class or null if absent. More...
 

Public Attributes

ECPStringList pAlternativeCommands
 
ECPStringList pBones
 
ECPString pCommand
 
ECPUnicodeString pDescription
 
ECPString pDescriptionTranslate
 
ECPBoolean pEnabled
 
ECPImage pImage
 
ECPFloat pMaximumDistance
 
ECPString pSettings
 
ECPString pStyle
 
TranslationManager pTranslationManager
 
ECPUnicodeString pVerb
 
ECPString pVerbTranslate
 
ECPVideo pVideo
 

Additional Inherited Members

- Protected Member Functions inherited from Dragengine.Scenery.DefaultECBehavior
void setBehaviorID (String identifier)
 Set behavior identifier. More...
 
void useClassNameAsBehaviorID ()
 Set behavior identifier to "<class-name>:<identifier>". More...
 
void useFullyQualifiedClassNameAsBehaviorID ()
 Set behavior identifier to "<fully-qualified-class-name>:<identifier>". More...
 

Detailed Description

Behavior adding support to elements to show interact prompt to player.

This is a passive behavior storing the information used by player prompt behaviors to show to the player what he can do with the element for example when looking at it.

The promp information composes of an image/video, style, verb, description and command. Not all information is shown by player prompt behaviors. Typically the image/video and verb is shown sometimes only the image/video. If multiple interactions are possible the command is usually also shown. The description can be used if the player needs some more information that can not be easily given using an image/video or a simple interact verb. The style is an optional information can be be used by the player prompt behavior to tint the image/video, verb text or even the description. This can be used to tell the player additional hints like if the interaction has potential caveats or is currently not possible to be done. The meaning of the style value depends on the prompt display widget used. A typical use of style is to be used as suffix for the widget designer selector.

The player prompt behavior determines where the image/video, verb, command and description text is shown.

This behavior has an enabled parameter. This can be used to temporarily disable the interact prompt for example to enable it when certain conditions are met or if multiple interact prompts are used for the same element. This allows to set them all up and enabling only the active one.

The command parameter is the name of the command as present in the CommandManager used by the player interact prompt display. If found the bindings used to trigger this command are shown or the command name whever the prompt display decides to use.

Prompts are typically used with collision testing for example ECBehaviorLookAt and likewise. In this situation it can be useful to assign prompts to individual areas of a collider for example using hit bone name as produced by collision tests. For this use case the bones parameter can be used. If this parameter is an not an empty list this prompt shall only be considered if the hit bone is included in the list.

This behavior can be used multiple times on an element to add different interaction prompts. Use the behavior identifier to tell them apart.

Default property prefix is "interactPrompt{(id)}."

Supports these properties:

Member Function Documentation

◆ getAlternativeCommands()

ECPStringList Dragengine.Scenery.ECBehaviorInteractPrompt.getAlternativeCommands ( )

Alternative commands.

Version
1.20

◆ getBehaviorIn()

static ECBehaviorInteractPrompt Dragengine.Scenery.ECBehaviorInteractPrompt.getBehaviorIn ( BehaviorElementClass  eclass)
static

Get behavior in element class or null if absent.

Use this method to check if a particular BehaviorElementClass contains a behavior of type ECBehaviorInteractPrompt.

◆ getBones()

ECPStringList Dragengine.Scenery.ECBehaviorInteractPrompt.getBones ( )

List of bones to restrict the prompt to.

◆ getCommand()

ECPString Dragengine.Scenery.ECBehaviorInteractPrompt.getCommand ( )

Command.

◆ getDescription()

ECPUnicodeString Dragengine.Scenery.ECBehaviorInteractPrompt.getDescription ( )

Description.

◆ getDescriptionTranslate()

ECPString Dragengine.Scenery.ECBehaviorInteractPrompt.getDescriptionTranslate ( )

Description translated by active language.

Version
1.16

◆ getEnabled()

ECPBoolean Dragengine.Scenery.ECBehaviorInteractPrompt.getEnabled ( )

Prompt is enabled.

◆ getImage()

ECPImage Dragengine.Scenery.ECBehaviorInteractPrompt.getImage ( )

Image.

◆ getMaximumDistance()

ECPFloat Dragengine.Scenery.ECBehaviorInteractPrompt.getMaximumDistance ( )

Maximum distance to show interact prompt for when looking at it.

Version
1.18

◆ getSettings()

ECPString Dragengine.Scenery.ECBehaviorInteractPrompt.getSettings ( )

Optional settings to modify custom prompt widget display.

Version
1.19

◆ getStyle()

ECPString Dragengine.Scenery.ECBehaviorInteractPrompt.getStyle ( )

Style.

◆ getTranslationManager()

TranslationManager Dragengine.Scenery.ECBehaviorInteractPrompt.getTranslationManager ( )

Translation manager or null.

Version
1.16

◆ getVerb()

ECPUnicodeString Dragengine.Scenery.ECBehaviorInteractPrompt.getVerb ( )

Verb.

◆ getVerbTranslate()

ECPString Dragengine.Scenery.ECBehaviorInteractPrompt.getVerbTranslate ( )

Verb translated by active language.

Version
1.16

◆ getVideo()

ECPVideo Dragengine.Scenery.ECBehaviorInteractPrompt.getVideo ( )

Video.

◆ instance()

Instance Dragengine.Scenery.ECBehaviorInteractPrompt.instance ( BehaviorElement  element)

Get instance in element from owner element class.

◆ new() [1/4]

ECBehaviorInteractPrompt Dragengine.Scenery.ECBehaviorInteractPrompt.new ( BehaviorElementClass  eclass)

Create behavior element class.

Reimplemented from Dragengine.Scenery.DefaultECBehavior.

◆ new() [2/4]

ECBehaviorInteractPrompt Dragengine.Scenery.ECBehaviorInteractPrompt.new ( BehaviorElementClass  eclass,
String  id 
)

Create default composeable behavior.

Reimplemented from Dragengine.Scenery.DefaultECBehavior.

◆ new() [3/4]

ECBehaviorInteractPrompt Dragengine.Scenery.ECBehaviorInteractPrompt.new ( BehaviorElementClass  eclass,
String  id,
String  subID 
)

◆ new() [4/4]

ECBehaviorInteractPrompt Dragengine.Scenery.ECBehaviorInteractPrompt.new ( BehaviorElementClass  eclass,
String  id,
String  subID,
String  prefix 
)

◆ setTranslationManager()

void Dragengine.Scenery.ECBehaviorInteractPrompt.setTranslationManager ( TranslationManager  manager)

Set translation manager or null.

Version
1.16

Member Data Documentation

◆ pAlternativeCommands

ECPStringList Dragengine.Scenery.ECBehaviorInteractPrompt.pAlternativeCommands

◆ pBones

ECPStringList Dragengine.Scenery.ECBehaviorInteractPrompt.pBones

◆ pCommand

ECPString Dragengine.Scenery.ECBehaviorInteractPrompt.pCommand

◆ pDescription

ECPUnicodeString Dragengine.Scenery.ECBehaviorInteractPrompt.pDescription

◆ pDescriptionTranslate

ECPString Dragengine.Scenery.ECBehaviorInteractPrompt.pDescriptionTranslate

◆ pEnabled

ECPBoolean Dragengine.Scenery.ECBehaviorInteractPrompt.pEnabled

◆ pImage

ECPImage Dragengine.Scenery.ECBehaviorInteractPrompt.pImage

◆ pMaximumDistance

ECPFloat Dragengine.Scenery.ECBehaviorInteractPrompt.pMaximumDistance

◆ pSettings

ECPString Dragengine.Scenery.ECBehaviorInteractPrompt.pSettings

◆ pStyle

ECPString Dragengine.Scenery.ECBehaviorInteractPrompt.pStyle

◆ pTranslationManager

TranslationManager Dragengine.Scenery.ECBehaviorInteractPrompt.pTranslationManager

◆ pVerb

ECPUnicodeString Dragengine.Scenery.ECBehaviorInteractPrompt.pVerb

◆ pVerbTranslate

ECPString Dragengine.Scenery.ECBehaviorInteractPrompt.pVerbTranslate

◆ pVideo

ECPVideo Dragengine.Scenery.ECBehaviorInteractPrompt.pVideo

The documentation for this class was generated from the following file: