Players
The player is the main object within the project and can be played by either the user or the ai.
Functions
get_save_data_bool_value
Get player archive data.
Parameter
Return
player:get_save_data_bool_value(name)
is_joins_in_the_middle_of_round
Whether the player joins in the middle of the round or not.
Return
player:is_joins_in_the_middle_of_round()
players_is_enemy
Whether the players are enemies or not.
Parameter
Return
player:players_is_enemy(player)
is_hotkey_of_basic_operation_is_occupied
Whether the player's basic operation shortcut key is occupied or not.
Parameters
Return
player:is_hotkey_of_basic_operation_is_occupied(key, assist_key)
set_role_name
Set the name.
Parameter
player:set_role_name(name)
set_faction_id
Set the team ID.
Parameter
player:set_faction_id(id)
set_player_attribute
Set the value of the attribute.
Parameters
player:set_player_attribute(key, value)
add_player_attribute
Add an attribute value.
Parameters
player:add_player_attribute(key, value)
set_rate_of_gaining_exp
Set the rate of experience gained.
Parameter
player:set_rate_of_gaining_exp(rate)
set_hostile_relationship
Set hostile relationship.
Parameters
player:set_hostile_relationship(player, is_hostile)
set_strict_group_navigation
Set group pathfinding strict mode.
Parameter
player:set_strict_group_navigation(is_strict)
select_unit
Select units/unit groups.
Parameter
set_follow_distance
Set the following distance.
Parameter
player:set_follow_distance(distance)
set_player_mouse_click_selection
Turn on/off mouse click selection for the player.
Parameter
player:set_player_mouse_click_selection(is_enable)
set_player_mouse_drag_selection
Enable/disable mouse frame selection for the player.
Parameter
player:set_player_mouse_drag_selection(is_enable)
set_player_mouse_wheel
Turn on/turn off the mouse wheel for the player.
Parameter
player:set_player_mouse_wheel(is_enable)
set_role_editable_game_func
Set the player's basic action shortcuts (filter out the ones that are disabled).
Parameters
player:set_role_editable_game_func(operation, key, assist_key)
set_role_all_game_func_enable
Set the player's basic operation switch (contains all basic operations).
Parameters
player:set_role_all_game_func_enable(operation, is_enable)
set_tech_level
Set tech level.
Parameters
player:set_tech_level(tech_type, level)
add_tech_level
Add a tech level.
Parameters
player:add_tech_level(tech_type, level)
share_view_with_player
Open view with player.
Parameter
player:share_view_with_player(player)
close_view_with_player
View is closed with player.
Parameter
player:close_view_with_player(player)
share_view_with_unit
Unit is open to player view.
Parameter
player:share_view_with_unit(unit)
close_view_with_unit
Unit closes the view with respect to the player.
Parameter
player:close_view_with_unit(unit)
upload_save_data
Upload the archive.
player:upload_save_data()
add_global_archive
Add a global archive.
Parameters
player:add_global_archive(key, value)
save_data
Set the player archive.
player:save_data(key, value)
use_purchasable_item
Consume player platform props.
Parameters
player:use_purchasable_item(count, item_id)
point_is_visible_to_player
Point is visible to the player.
Parameter
Return
player:point_is_visible_to_player(point)
point_is_in_fog_to_player
Point is in the fog.
Parameter
Return
player:point_is_in_fog_to_player(point)
point_is_in_shadow_to_player
Point is in black shadow.
Parameter
Return
player:point_is_in_shadow_to_player(point)
get_key_related_to_basic_operation
Get the player's basic operation in response to keyboard keystrokes (filter out prohibited settings).
Parameters
Return
player:get_key_related_to_basic_operation(key, assist_key)
get_player_attribute
Get player attributes.
Parameter
Return
player:get_player_attribute(key)
get_player_id
Get the player ID.
Return
get_game_state
Get the player's game state.
Return
get_control_type
Get the player controller type.
Return
player:get_control_type()
get_name
Get the player name.
Return
get_save_data_table_value
Tabular player archive data.
Parameter
Return
player:get_save_data_table_value(key)
get_exp_multiplier
Get the experience gain rate.
Return
player:get_exp_multiplier()
get_faction_id
Get the team ID.
Return
get_string_player_archive_data
String type player archive data.
Parameter
player:get_string_player_archive_data(key)
get_float_player_archive_data
Real type archive data.
Parameter
Return
player:get_float_player_archive_data(key)
get_tech_level
Gets the tech level.
Parameter
Return
player:get_tech_level(tech_id)
get_platform_icon
Get the player's platform avatar.
Return
player:get_platform_icon()
get_player_purchasable_number
Number of player platform props.
Parameter
Return
player:get_player_purchasable_number(id)
get_int_player_archive_data
Get integer type archive data.
Parameter
Return
player:get_int_player_archive_data(key)
get_player_archive_rank_num
Get integer archive player rank.
Parameter
Return
player:get_player_archive_rank_num(key)
get_player_platform_level
Get player platform rank.
Return
player:get_player_platform_level()
is_player_in_group
The player is in the player group.
Parameter
Return
player:is_player_in_group(player_group)
all_units_belonging_to_specified_player
All units belonging to a player.
Return
player:all_units_belonging_to_specified_player()
remove_player
Force kick out.
Parameter
player:remove_player(reason)
set_currency_icon
Set the player property icon.
Parameters
cli.set_currency_icon(key, id)
get_player_platform_model
Get the player platform appearance model.
Return
player:get_player_platform_model()
get_mouse_world_coordinates_of_player
Get the mouse's in-game coordinates.
Return
player:get_mouse_world_coordinates_of_player()
get_proportion_of_player_mouse_screen_coordinate_x
Get the proportion of the player's mouse screen coordinate x.
Return
player:get_proportion_of_player_mouse_screen_coordinate_x()
get_proportion_of_player_mouse_screen_coordinate_y
Get the proportion of the player's mouse screen coordinate Y.
Return
player:get_proportion_of_player_mouse_screen_coordinate_y()
get_player_ui_pos_x
Get the X coordinate of the mouse on the screen.
Return
player:get_player_ui_pos_x()
get_player_ui_pos_y
Get the Y coordinate of the mouse on the screen.
Return
player:get_player_ui_pos_y()
set_currency_icon_for_player_attribute
Get the currency icon for the player attribute.
Parameter
Return
player.set_currency_icon_for_player_attribute(key)
convert_player_id_to_player
Convert player ID to player.
Parameter
Return
player.convert_player_id_to_player(id)
get_player_attribute_name
Get the name of the player attribute.
Parameter
Return
player.get_player_attribute_name(key)