User Tools

Site Tools


democap:behavior_ecbtemporaryghost

ECBTemporaryGhost

Behavior adding support to temporarily display object as ghost. If enabled replaces all component textures with ghost texture. If disabled restored previous textures.

Instance Counts

This behavior can be used only once on an element.

Element Class Properties

Element class properties have the prefix temporaryGhost..

skin

Path of skin resource to use if enabled.

  • Full name: temporaryGhost.skin
  • Type: string
  • Default Value: /content/materials/ghost/ghost.deskin
  • Expected File Type: *.deskin
  • Example (*.deeclass)
    <string name='temporaryGhost.skin'>/content/materials/ghost/ghost.deskin</string>

Events

enabledChanged

Enabled changed.

Conversation Commands

This behavior adds no conversation commands.

Conversation Conditions

This behavior adds no conversation conditions.

Behavior Tree Actions

This behavior adds no behavior tree actions.

Behavior Tree Conditions

This behavior adds no behavior tree conditions.

Required Behaviors

Optional Behaviors

This behavior does not support optional behaviors.

API Documentation

Since DEMoCap Version 1.3

Use Cases

  • Temporarily replace textures of object to see through.

Element Class Example

class MyElement extends BehaviorElementClass
  public var ECBehaviorComponent component
  public var ECBTemporaryGhost temporaryGhost
  func new()
    component = ECBehaviorComponent.new(this, null)
    temporaryGhost = ECBTemporaryGhost.new(this, component)
  end
end

Behavior Factory

Using element class supporting adding behaviors the behavior can be added like this (again create an example which creates a valid element class):

<?xml version='1.0' encoding='UTF-8'?>
<elementClass name='MyClass' class='GenericBehaviorElement'>
  <behavior type='ECBehaviorComponent'/>
  <behavior type='ECBBehaviorGuiPanels'/>
 
  <behavior type='ECBTemporaryGhost'>
    <!-- optional: list of components to apply ghost to. default is behavior with
                   empty string if present. -->
    <list name='components'>
      <string/>
      <string>second</string>
    </list>
 
    <!-- set element properties. omit property prefix if used inside behavior tag -->
    <string name='.skin'>/content/materials/ghost/ghost.deskin</string>
  </behavior>
</elementClass>

Live Examples

You could leave a comment if you were logged in.
democap/behavior_ecbtemporaryghost.txt · Last modified: 2025/03/22 18:06 by dragonlord