-
Notifications
You must be signed in to change notification settings - Fork 18
Cast Spell
cast_spell.self(spell_id, animation_time)
-
spell_id
: Number (Int) - The identifier of the spell to cast. -
animation_time
: Number (Float) - The animation time of the spell.
Note
Casts a spell on the caster (self-cast) with specified animation time.
- Returns:
bool
cast_spell.target(target, spell_id, animation_time, is_debug_mode)
-
target
:gameobject
- The target object for the spell. -
spell_id
: Number (Int) - The identifier of the spell to cast. -
animation_time
: Number (Float) - The animation time of the spell. -
is_debug_mode
: Bool - Option to enable debug mode.
Note
Casts a spell towards a specific target with animation time and an optional debug mode.
- Returns:
bool
cast_spell.target(target, spell_data, is_debug_mode)
-
target
:gameobject
- The target object for the spell. -
spell_data
:spell_data
- Detailed data of the spell. -
is_debug_mode
: Bool - Option to enable debug mode.
Note
Casts a spell towards a target using detailed spell data, with optional debug mode.
- Returns:
bool
cast_spell.position(spell_id, position, animation_time)
-
spell_id
: Number (Int) - The identifier of the spell to cast. -
position
:vec3
- The position to cast the spell. -
animation_time
: Number (Float) - The animation time of the spell.
cast_spell.add_channel_spell(spell_id, start_time, finish_time, cast_target, cast_position, animation_time, interval)
-
spell_id
: Number (Int) - The identifier of the spell. -
start_time
: Number (Float) [Optional] - The start time for the spell. Defaults to current time. -
finish_time
: Number (Float) [Optional] - The finish time for the spell. Defaults to0
(undefined). -
cast_target
:gameobject
[Optional] - The target object to cast the spell on. -
cast_position
:vec3
[Optional] - The position to cast the spell at. -
animation_time
: Number (Float) [Optional] - The animation time of the spell (will block other actions like movement inputs). -
interval
: Number (Float) [Optional] - The intervals you want the spell to be casted, by default 0 means spam the spell.
Note
Adds a channel spell with specified parameters. Defaults are provided for optional parameters.
cast_spell.pause_all_channel_spells(pause_duration)
-
pause_duration
: Number (Float) - The duration to pause all spells in seconds.
Note
Pauses all active channel spells for the specified duration.
cast_spell.pause_specific_channel_spell(spell_id, pause_duration)
-
spell_id
: Number (Int) - The identifier of the spell to pause. -
pause_duration
: Number (Float) - The duration to pause the spell in seconds.
Note
Pauses a specific channel spell by its identifier for the specified duration.
cast_spell.is_channel_spell_active(spell_id)
-
spell_id
: Number (Int) - The identifier of the spell to check.
Note
Checks if a specific spell is currently active in the channel spell handler.
- Returns:
bool
cast_spell.update_channel_spell_target(spell_id, new_target)
-
spell_id
: Number (Int) - The identifier of the spell to update. -
new_target
:gameobject
- The new target object for the spell.
Note
Updates the target object of a specific channel spell.
cast_spell.update_channel_spell_position(spell_id, new_position)
-
spell_id
: Number (Int) - The identifier of the spell to update. -
new_position
:vec3
- The new position to cast the spell.
Note
Updates the position of a specific channel spell.
cast_spell.update_channel_spell_finish_time(spell_id, new_finish_time)
-
spell_id
: Number (Int) - The identifier of the spell to update. -
new_finish_time
: Number (Float) - The new finish time of the spell.
Note
Updates the finish time of a specific channel spell.
cast_spell.update_channel_spell_start_time(spell_id, new_start_time)
-
spell_id
: Number (Int) - The identifier of the spell to update. -
new_start_time
: Number (Float) - The new start time of the spell.
Note
Updates the start time of a specific channel spell.
cast_spell.update_channel_spell_animation_time(spell_id, new_animation_time)
-
spell_id
: Number (Int) - The identifier of the spell to update. -
new_animation_time
: Number (Float) - The new animation time of the spell.
Note
Updates the animation time of a specific channel spell.
cast_spell.update_channel_spell_interval(spell_id, new_interval)
-
spell_id
: Number (Int) - The identifier of the spell to update. -
new_interval
: Number (Float) - The new interval time of the spell.
Note
Updates the interval time of a specific channel spell.
cast_spell.remove_channel_spell(spell_id)
-
spell_id
: Number (Int) - The identifier of the spell to remove.
Note
Removes a specific channel spell by its identifier.