Overview
Ability
Ability is one of the basic elements within the project and needs to be hooked up to a unit and released by the unit to produce a subsequent effect.
Functions
Ability triggers need to be included in a group to use group variables.
Events
Area
The Area is one of the base elements within the project that can be controlled against a fixed region, triggering the unit to enter and leave the region event.
Functions
Beam
You can create beam between units or points.
Functions
Function | Description |
---|---|
create_unit_to_point | Create beam (from unit to point). |
create_unit_to_unit | Create a beam (from unit to unit). |
create_point_to_unit | Create a beam (from point to unit). |
create_point_to_point | Create a beam (from point to point). |
remove_link_sfx | Destroy a beam. |
enable_link_sfx_show | Show/hide a beam. |
set_link_sfx_point | Set to point. |
set_link_sfx_unit_socket | Set to unit hookup point. |
Camera
The camera is one of the basic elements within the project. The game camera is the tool that controls the player's point of view.
Functions
Destructible
Destructible is one of the basic elements in the project, which can be directly created on the map, generally immovable, and can interact with skills.
Functions
Destroyable triggers need to be contained in a group to use group variables.
Item
Item is one of the basic elements in a project, which can be placed on the map or held by units.
Functions
Item triggers need to be contained in a group to use group variables.
Events
Event | Description |
---|---|
Item created | Item creation event. |
Item created as collection | Items are collected and created. |
Item pick up | Item acquisition event. |
Item lose | Item lost event. |
Item used | Item use event. |
Item in bag | Item enters backpack event. |
Item remove bag | Item leaving inventory slot event. |
Item in item bar | Item enters inventory event. |
Item remove item bar | Item leaves inventory event. |
Item stack changed | Item change layer event. |
Item charge changed | Item change charge event. |
Item destroy | Item destruction event. |
Item group
The item group can perform traversal operations on multiple items in the area.
Functions
Function | Description |
---|---|
get_all_items_in_shapes | Filter all items in the range. |
Light
Light Play Light is a tool that simulates real-world optical properties and can add realism and beauty to a game scene.
Functions
Function | Description |
---|---|
get_light_by_scene_id | Get the Light according to the scene ID. |
get_light_attribute | Get the light attribute. |
get_light_cast_shadow_state | Get whether the light casts a shadow. |
create_point_light_at_point | Create a point light to a point. |
create_point_light_at_unit_socket | Create a point light to a unit socket. |
create_directional_light_at_point | Create directional light to point. |
create_directional_light_at_unit_socket | Create a directional Light to a unit mount point. |
remove_light | Remove light. |
set_shadow_casting_status | Set whether the light casts shadows. |
set_point_light_attribute | Set the point light attribute. |
set_directional_light_attribute | Set the directional light attribute. |
Modifier
Modifier is one of the basic elements in the project, which needs to be placed on the unit to produce the corresponding effect.
Functions
Magic effect triggers need to be contained in a group to use group variables.
Events
Event | Description |
---|---|
Gain modifier | Get magic effect. |
Lose modifier | Lost magic effect. |
Period ends | Cycle expires. |
Modifier stacks change | Magic effect layer change event. |
About to gain modifier | The magic effect is about to be obtained. |
Modifier overwritten | Magic effect override. |
Particle
Particle implements various effects effects in the game, which can be created to be displayed on points, or units hanging on points.
Functions
Function | Description |
---|---|
create_at_point | Create at point. |
remove | Remove. |
create_at_unit | Create to unit. |
set_rotational_angle | Set the rotation angle. |
set_orientation | Set the orientation. |
set_scale | Set the scaling. |
set_height | Set the height. |
set_coordinate | Set the coordinates. |
set_animation_speed | Set the animation speed. |
set_duration | Set the duration. |
Path
Path is one of the basic elements in a project, consisting of multiple point links that can be used as unit movement routes.
Functions
Function | Description |
---|---|
get_path_by_scene_id | Get path by scene ID. |
get_lua_path_from_py | Create paths from py objects. |
has_tag | Whether the path has a tag or not. |
remove_path | Remove path. |
add_point | Add a point to a path. |
remove_point | Remove a point from a path. |
add_tag | Adds a tag to a path. |
remove_tag | Remove a tag from a path. |
get_point_count | Get the number of points in the path. |
create_path | Create a path starting with a point. |
Players
The player is the main object within the project and can be played by either the user or the ai.
Functions
Player Group
Player Group can be filtered to store multiple players, and traverse the player group to perform uniform actions on the players in the player group.
Functions
Function | Description |
---|---|
add_player | Add a player. |
remove_player | Remove a player. |
clear_group | Clear the group. |
get_player_num | Get the number of players in a player group. |
get_all_players | Get all players. |
get_player_group_by_camp | All players in the camp. |
get_enemy_player_group_by_player | All hostile players of the player. |
get_ally_player_group_by_player | All allied players of the player. |
get_victorious_player_group | Get all the victorious players. |
get_defeated_player_group | Get all defeated players. |
get_neutral_player_group | All non-neutral players. |
Point
The point is one of the base elements within the project, and can be used as a prefabricated position, or a coordinate record.
Functions
Function | Description |
---|---|
get_point_by_scene_id | Get area by scene ID. |
get_lua_point_from_py | Create points from py objects. |
set_collision | Set the collision. |
get_ground_collision | Get the collision type of the map at this point. |
get_view_block_type | Gets the view type of the map at the point's location. |
get_point_x | The X coordinate of the point. |
get_point_y | The Y coordinate of the point. |
get_point_z | The Z coordinate of the point. |
get_point_by_xy | Convert coordinates to points. |
get_point_offset_vector | Point offset in the direction. |
get_point_in_path | The point in the path. |
Projectile
Projectile is one of the basic elements in the project, which can be placed on the scene.
Functions
Projectile triggers need to be contained in a group to use group variables.
Events
Event | Description |
---|---|
Destructible created | Destructible creation. |
Destructible revived | Destroyable resurrection. |
Destructible died | Destructible death event. |
Destructible collected | Destructibles are harvested. |
Destructible resource change | Changes in the amount of destructible resources. |
Destructible hunted | Destructibles take damage. |
Scene UI
The Scene UI is used in conjunction with the UI, which can be placed on a scene or unit pendant for display.
Functions
Function | Description |
---|---|
get_lua_scene_ui_from_py | Get the UI instance of the lua layer from the UI instance of the py layer. |
create_scene_ui_at_player_unit_socket | Create a scene interface to a player unit mount point. |
remove_scene_ui | Remove the scene interface. |
get_widget_in_scene_ui | Get the controls in the scene UI |
set_scene_ui_visible_distance | Set the visible distance of the scene interface to the player. |
Selector
The selector selector can select multiple units in a certain area by specifying the shape and the corresponding selection rule.
Functions
Function | Description |
---|---|
get_units_in_circular_area | |
get_projectiles_in_circular_area |
Timer
The timer is accurate to milliseconds. A callback function will be executed every time the timer expires.
Functions
Function | Description |
---|---|
get_elapsed_time | Get the elapsed time of the timer. |
get_init_count | Get the initial count of the timer. |
get_remaining_time | Get the remaining time of the timer. |
get_remaining_count | Get the remaining count of the timer. |
get_time_out_time | Get the time the timer was set for. |
UI
UI is one of the basic elements in the project and one of the important ways for players to interact with the game.
Functions
UI Prefab
UI Prefab can be used in conjunction with UI, and multiple UI modules can be used.
Functions
Function | Description |
---|---|
get_lua_ui_prefab_from_py | Get the interface instance of lua layer from the interface instance of py layer. |
create_ui_prefab_instance | Create an interface module instance. |
set_show_room_background_color | Set the background color of the interface model control. |
remove_ui_prefab | Example of removing an interface module. |
get_ui_prefab_child_by_path | Get the controls under the interface module instance by the interface module path. |
Unit
Unit is one of the basic elements in the project, skill and magic effect need to be attached to the unit to produce subsequent effects.
Functions
Function | Description |
---|---|
create_unit | Create unit. |
remove_unit | Delete unit.Deleting a unit will trigger a Unit Destroyed Event. |
Teleport_to_Point | Move unit to point instant. Units may get stuck in weird positions if the target point is not reachable. |
set_unit_to_point | Force move unit to point. After smooth movement is checked, the unit will translate to the target point, forcing the movement to ignore restrictions such as collisions. |
resurrect_unit | Resurrection unit to target point. Only units that have not been destroyed can be revived. |
heals | Heal the unit. |
add_tag | Label an organization. |
remove_tag | Remove an organization's label. |
add_state | Add status to unit. The unit's status exists counted, that is, after being added twice, it needs to be removed twice before it can actually be removed. |
remove_state | Remove the status of the unit. The unit's status exists counted, that is, after being added twice, it needs to be removed twice before it can actually be removed. |
learns_ability | Let units learn skills. Learning requires skill points. |
release_command | Issue orders to units. |
set_orientation | Set the orientation of the unit. The unit will slowly turn its face towards it during the turn time. |
set_name | Set the name of the unit. |
set_description | Set the description of the unit. |
set_attributes | Set the properties of the unit |
increase_attributes | Add unit properties. Negative values decrease. |
set_level | Set the level of the unit. Downgrading does not reclaim skill points. |
increase_level | Increase the level of the unit. Downgrading does not reclaim skill points. |
set_exp | Set the unit's current experience. |
increase_exp | Add experience to units. |
set_current_hp | Set the unit's current health. |
increase_current_hp | Increase the unit's current health. |
set_current_mp | Set the unit's current mana. |
increase_current_mp | Increase the unit's current mana. |
set_hero_ability_point | Set the number of skill points for a unit. |
increase_hero_ability_point | Add skill points to units. |
set_unit_height | Set the flying height of the unit. After changing the altitude, the unit will slowly move past within the changing time. |
set_life_cycle | Set the lifecycle of the unit. After the life cycle runs out, the unit will die naturally. |
set_pause_state_of_life_cycle | Set a unit's lifecycle paused state. |
set_alert_range | Set the alert range of the unit. |
set_cancel_alert_range | Set the unit's disarm range. |
set_unit_pkg_cnt | Set the number of slots in the unit's inventory slot. |
set_unit_bar_cnt | Set the number of slots in the unit's inventory. |
set_default_switch_behavior | Set the default behavior of units. |
set_attr_growth | Set the property growth of the unit. |
set_unit_reward_exp | Set the experience value reward for the unit being killed. |
set_unit_reward_res | Set the attribute reward of the killed player. |
set_attack_type | Set the unit's attack type. |
set_armor_type | Set the armor type of the unit. |
enable_afterimage | Turn on afterimages of units. |
disable_afterimage | Turn off the afterimage of the unit. |
set_afterimage_color | Set the afterimage color for units. |
set_afterimage_time | Set the afterimage time for the unit. |
set_unit_avatar | Set unit avatar. |
set_blood_bar_type | Set the unit's health bar style. |
set_health_bar_display | Set the health bar display mode of the unit. |
set_minimap_avatar_for_unit | Set the unit minimap avatar. |
set_minimap_avatar_for_enemy_unit | Set the minimap portrait of the enemy unit. |
set_model_scale | Set model scaling in units. |
set_turning_speed | Set the unit's turn speed. |
replace_model | Replace model. |
cancel_replace_model | Cancel model replacement. Restore the unit's model to how it was originally. |
set_semitransparency_when_hidden_unit_is_visible | Set whether to be translucent or not when invisible. |
set_corpse_recyclable_status_after_fading | Set whether to recycle or not after the corpse disappears. |
set_Xray_is_open | Set perspective state. |
add_tech_to_unit | Units add technology. |
remove_tech_from_unit | Unit delete technology. |
research_tech | Research technology. |
play_animation | play animation. |
stop_animation | Stop animation. |
change_animation | Replace animation. |
cancel_change_animation | Cancel animation replacement. |
clear_change_animation | reset animation replacement |
stop_cur_animation | Stop the currently playing animation. |
set_animation_speed | Set the animation playback rate. |
add_item | Add items to the store. |
remove_item | Remove item from store. |
set_item_stock | Set the inventory of items in the store. |
sell_item_to_shop | Sell items to shop. |
purchase_item_from_shop | Purchase items from the store. |
remove_item_from_unit | Unit removes items. |
transfer_item_to_unit | Transfer items. |
add_item_to_unit | Unit add items. |
add_modifier | Add magic effects to units. |
remove_modifier_type | Unit removal magic effect type. |
delete_all_modifiers_by_effect_type | Remove magic effects that affect the type. |
get_specified_modifier_type | Get the magic effect of the specified type for the unit. |
get_recovery_interval_of_shop_goods | Get the stock interval of store items. |
get_remaining_recovery_time_of_shop_goods | Get the remaining recovery time of a store item. |
remove_abilities_in_type | Remove skills (specific types). |
get_abilities_by_type | Get a specific type of skill. |
add_ability | Add skills. |
remove_ability | Remove skill. |
get_ability_by_type | Find skills by skill name. |
get_ability_by_slot | Acquiring the skill of a certain skill position. |
get_item_by_slot | Get the item in the unit's backpack slot. |
get_all_items | All items in the unit. |
kill_unit | Kill unit. |
create_illusion | Create illusion. |
unit_gains_tech | Units gain technology. |
change_unit_role | Set owning player. |
get_tech_list | Traversing research and development technology to do actions. |
get_affect_techs | Traversing applied technology doing actions. |
get_shop_item_list | Iterate through the items in the store to perform actions. |
get_current_unit_hp | Get the current health value. |
get_current_unit_mp | Get the current mana. |
get_attr_other | Get the property of the unit's extra property type. |
get_attr_base | Get the property of the unit's base property type. |
get_attr_base_ratio | Get the attribute of the unit's basic attribute bonus type. |
get_attr_bonus | Get properties of unity gain property type. |
get_attr_all_ratio | Get the attribute of the unit's total attribute bonus type. |
get_attr_bonus_ratio | Get the attribute of the unit gain attribute bonus type. |
get_unit_attribute_growth | Get unit attribute growth. |
get_life_cycle_of_unit | Get unit lifecycle. |
get_height | Get unit flight altitude. |
get_unit_turning_speed | Get unit turn speed. |
get_unit_alert_range | Get unit alert range. |
get_unit_cancel_alert_range | Get unit cancel alert range. |
get_unit_collision_radius | Get the unit collision radius. |
get_unit_resource_cost | Get unit construction resource consumption property. |
get_player_attribute_gained_from_killing_unit | Get the attribute of the player who was killed by the unit. |
get_scale | Get the unit scale. |
get_unit_selection_range_scale | Get unit selection circle zoom. |
get_unit_xaxis_scale | Get the X-axis scaling of the unit. |
get_unit_zaxis_scale | Get the Z-axis scaling of the unit. |
get_unit_yaxis_scale | Get the Y-axis scaling of the unit. |
get_shop_purchase_range | Get the purchase scope of the store. |
get_unit_level | Get unit level. |
get_key | Get the unit type ID of the unit. |
get_current_exp_of_unit | Get the current experience value of the unit. |
get_exp_required_for_current_upgrade | Gain the experience needed for the unit's current upgrade. |
get_hero_ability_point_number | Get the hero's skill points. |
get_unit_bag_slot_number | Get the number of slots in the unit's inventory. |
get_unit_inventory_slot_number | Get the number of slots in the unit's inventory. |
get_item_type_number_of_unit | Get the number of item types owned by the unit. |
get_exp_gained_from_killing_unit | Get unit kill experience. |
get_shield_value_of_specified_type_for_unit | Get the shield value of the specified shield type for the unit. |
get_shop_tab_number | Get the number of store tabs. |
get_shop_item_stock | Get the store's item inventory. |
get_unit_name | Get unit name. |
get_unit_description | Get the description of the unit. |
get_unit_type_name | Get unit type name. |
get_unit_type_description | Get the description of the unit type. |
get_shop_tab_name | Get the store's page signature. |
get_unit_subtype | Get unit classification. |
get_image_of_unit_type_icon | Get the avatar of the unit type. |
get_unit_type | Get unit type. |
last_unit_created | Last created unit. |
get_unit_owner | Get the owner of the unit unit. |
get_illusion_summoner | Get the summoner of visions. |
get_unit_orientation | Get the orientation of the unit. |
get_armor_type | Get armor type. |
get_attack_type | Get attack type. |
get_shop_goods | Get items from the store. |
get_current_unit_model | Get the current model of the unit. |
get_original_unit_model | Get the original model of the unit. |
get_unit_location_point | Get the location of the unit. |
get_nearest_reachable_point_to_unit | Get the nearest passable point of the unit. |
get_camp | Get unit's team. |
has_tag | Whether to have a label or not. |
is_unit_alive | Whether to survive or not. |
visibility_of_unit | Whether it is visible or not. |
is_unit_moving | Whether the unit is moving or not. |
is_in_radius | Whether it is near the unit or not. |
unit_is_shop | Whether the unit is a store or not. |
is_unit_illusion | Whether the unit is an illusion or not. |
unit_in_group | Whether the unit is in the unit group or not. |
is_in_battle | Whether the unit is in combat or not. |
has_buff_status | Whether the unit has a designated status or not. |
check_has_ability_type | Whether the unit has a specific type of skill or not. |
unit_has_item | Whether there are items or not. |
unit_has_item_name | Whether there are items of the specified type or not. |
unit_has_modifier | Whether the unit has magic effect or not. |
unit_has_modifier_style | Whether the unit has magic effects of the specified affect type or not. |
unit_has_modifier_tag | Whether the unit has the magic effects with specified tags or not. |
check_unit_key_precondition | Whether the unit type precondition is passed or not. |
is_enemy_relation | Whether the unit is a hostile relationship or not. |
can_teleport_to | Whether the unit can be sent to the point or not. |
unit_can_collide_with_point | Whether to collide with the point or not. |
unit_can_from_point_to_point | Whether pathfinding is reachable or not. |
get_unit_move_collision | Whether to have the specified collision type or not. |
get_unit_player | Get the player the unit belongs to. |
Unit triggers need to be included in a group to use group variables.
Events
Unit group
Unit Group allows you to put multiple units in a group for uniform processing.