VFXSelectionMaterial ​
Inherits: VFXSelection < Resource
Material VFX selection - material overrides for entities
Properties ​
MaterialTarget | material_target | MaterialTarget.BODY: |
MaterialBlendMode | blend_mode | MaterialBlendMode.OVERLAY: |
bool | auto_cleanup_on_entity_death | true |
bool | allow_stacking | true |
int | priority | 0 |
float | fade_in | 0.4 |
float | fade_out | 0.4 |
VFXFade.Style | fade_style | VFXFade.Style.DISSOLVE |
String | target_material_slot | "body": |
Methods ​
Array[VFX] | spawn_vfx( vfx_manager: VFXManager, target: Variant = null, originator: Variant = null, timer: Timer = null ) |
Variant | prepare_target_for_vfx_type( target: Variant, originator: Variant = null ) |
String | get_description() |
String | get_vfx_type() |
String | get_vfx_name() |
String | get_selection_type_name() |
Array[String] | get_available_vfx_names() |
void | set_vfx_name( name: String ) |
String | get_current_vfx_name() |
bool | is_valid_selection() |
Material | get_material_from_database() |
Enumerations ​
enum MaterialTarget ​
========== NEW MATERIAL TARGET SYSTEM ==========
- BODY =
0 - WEAPONS =
1 - MAIN_HAND =
2 - OFF_HAND =
3
enum MaterialBlendMode ​
The options of material blend mode: replace, overlay, additive, multiply.
- REPLACE =
0 - OVERLAY =
1 - ADDITIVE =
2
Property descriptions ​
MaterialTarget material_target = MaterialTarget.BODY: ​
========== UPDATED EXPORTS ==========
MaterialBlendMode blend_mode = MaterialBlendMode.OVERLAY: ​
How the material is combined with the material of the entity (overlay ...).
bool auto_cleanup_on_entity_death = true ​
True when the material goes away when the entity dies.
bool allow_stacking = true ​
True when more than one of this material can be on the entity.
int priority = 0 ​
Which material wins when several are on the entity (higher wins).
float fade_in = 0.4 ​
How long the material takes to come on, in seconds (0: at once). A skin is drawn over the body while it comes on and replaces it after.
float fade_out = 0.4 ​
How long the material takes to go when it ends (its time is up, the effect ends, the entity dies), in seconds (0: at once)
VFXFade.Style fade_style = VFXFade.Style.DISSOLVE ​
How it comes and goes: Fade (it gets fainter) or Dissolve (it spreads over the body in patches, and breaks up the same way)
String target_material_slot = "body": ​
========== BACKWARD COMPATIBILITY ========== Keep the old target_material_slot for existing content
Method descriptions ​
Array[VFX] spawn_vfx( vfx_manager: VFXManager, target: Variant = null, originator: Variant = null, timer: Timer = null ) ​
Override spawn method - Material VFX returns empty array since it doesn't create VFX nodes
Variant prepare_target_for_vfx_type( target: Variant, originator: Variant = null ) ​
Checks and converts the target for this kind of visual effect (it needs an entity).
String get_description() ​
A short text about the visual effect, for the editor.
String get_vfx_type() ​
The kind of visual effect (beam, loop, one shot ...).
String get_vfx_name() ​
The name of the visual effect that is picked.
String get_selection_type_name() ​
Get the VFX type name for dialog system
Array[String] get_available_vfx_names() ​
Get available VFX names for this type from database
void set_vfx_name( name: String ) ​
Set VFX name (called by dialog system)
String get_current_vfx_name() ​
Get current VFX name (called by dialog system)
bool is_valid_selection() ​
========== VALIDATION HELPERS ==========
Material get_material_from_database() ​
The material this selection points to, or null when it is not set.