VFXTelegraph ​
Telegraph VFX - Warning/indicator effects for abilities Uses shader-based approach for smooth fill animations without texture regeneration
Properties ​
Vector2 | telegraph_size | Vector2(5.0, 5.0) |
TelegraphShape | telegraph_shape | TelegraphShape.CIRCLE |
Color | telegraph_color | Color.RED |
TelegraphAttachment | attachment_type | TelegraphAttachment.POINT |
float | orientation_offset | 0.0 |
Variables ​
float | telegraph_duration | 0.0 |
float | completion_percentage | 0.0 |
Tween | telegraph_tween | |
MeshInstance3D | telegraph_mesh | |
ShaderMaterial | telegraph_material | |
Shader | telegraph_shader | |
bool | is_telegraph_active | false |
bool | is_interrupted | false |
Texture2D | outline_texture | null |
Methods ​
void | setup_from_selection( selection: VFXSelectionTelegraph ) |
void | set_outline_texture( texture: Texture2D ) |
void | start_telegraph( duration: float ) |
void | interrupt_telegraph() |
float | default_fade_in() |
float | default_fade_out() |
void | deactivate_vfx() |
bool | is_telegraph_valid() |
float | get_remaining_time() |
void | set_telegraph_shape( shape: TelegraphShape ) |
void | set_telegraph_color( color: Color ) |
void | set_shader_parameter( param_name: String, value ) |
void | reset_for_pooling() |
Enumerations ​
enum TelegraphAttachment ​
The options of telegraph attachment: point, attached.
- POINT =
0
enum TelegraphShape ​
The options of telegraph shape: circle, square.
- CIRCLE =
0 - SQUARE =
1
Constants ​
constTELEGRAPH_FILL_SHADER =preload("res://addons/chroniclenode/assets/shaders/telegraph_fill_shader.gdsh...- The shader that fills the warning.
Property descriptions ​
Telegraph Settings
Vector2 telegraph_size = Vector2(5.0, 5.0) ​
The size of the warning.
TelegraphShape telegraph_shape = TelegraphShape.CIRCLE ​
The shape of the warning.
Color telegraph_color = Color.RED ​
The color of the warning.
TelegraphAttachment attachment_type = TelegraphAttachment.POINT ​
What the warning is attached to.
float orientation_offset = 0.0 ​
Y rotation in degrees
Variable descriptions ​
float telegraph_duration = 0.0 ​
Animation
float completion_percentage = 0.0 ​
0.0 to 1.0 progression
Tween telegraph_tween ​
The tween that fills the warning.
MeshInstance3D telegraph_mesh ​
Telegraph visual components
ShaderMaterial telegraph_material ​
The material of the warning.
Shader telegraph_shader ​
The shader of the warning.
bool is_telegraph_active = false ​
State tracking
bool is_interrupted = false ​
True when the warning was cut short.
Texture2D outline_texture = null ​
The picture of the shape the warning draws (a telegraph outline of the library, src/data/vfx/telegraph: the red channel is the area, the green how far inside the edge, the blue the order it fills in). With none the circle or the square is drawn
Method descriptions ​
void setup_from_selection( selection: VFXSelectionTelegraph ) ​
Setup telegraph from selection (called by VFXManager)
void set_outline_texture( texture: Texture2D ) ​
Set the picture of the shape (the VFXManager picks it by the name of the telegraph; null goes back to the circle and square)
void start_telegraph( duration: float ) ​
Start the telegraph animation with given duration
void interrupt_telegraph() ​
Called when telegraph is interrupted (cast cancelled, etc.)
float default_fade_in() ​
A warning fades in over 0.1 s and, cut short, out over 0.15 s
float default_fade_out() ​
The fade out of the kind of effect (VFX: 0.2 s); a kind overrides it (from VFX)
void deactivate_vfx() ​
Override cleanup to handle telegraph-specific cleanup
bool is_telegraph_valid() ​
Check if telegraph is still valid
float get_remaining_time() ​
Get remaining time on telegraph
void set_telegraph_shape( shape: TelegraphShape ) ​
Set telegraph shape (can be called at runtime)
void set_telegraph_color( color: Color ) ​
Set telegraph color (can be called at runtime)
void set_shader_parameter( param_name: String, value ) ​
Set shader parameter directly (for advanced customization)
void reset_for_pooling() ​
Reset telegraph for pool reuse