Nate said:
Nate said:s this a technically unnecessary naming convention?
Nate said:What is the maximum number of parameters you can pass with call_script?
kalarhan said:Test it
16Nate said:What is the maximum number of parameters you can pass with call_script?
Nope.K.A. said:Do you mean convert the target to local position with position_transform_position_to_local ?
position_move_x = 720 # (position_move_x, <position>, <movement>, [value]),
# Moves position along X axis. Movement distance is in cms. Optional parameter determines whether the position is moved along the local (value=0) or global (value=1) X axis (i.e. whether the position will be moved to it's right/left, or to the global east/west).
# script_game_get_upgrade_cost
# This script is called from game engine for calculating needed cost upgrade
# Input:
# param1: troop_id,
# Output: reg0 = needed cost for upgrade
("game_get_upgrade_cost",
[
(store_script_param_1, ":troop_id"),
(store_character_level, ":troop_level", ":troop_id"),
(try_begin),
(is_between, ":troop_level", 0, 6),
(assign, reg0, 10),
(else_try),
(is_between, ":troop_level", 6, 11),
(assign, reg0, 20),
(else_try),
(is_between, ":troop_level", 11, 16),
(assign, reg0, 40),
(else_try),
(is_between, ":troop_level", 16, 21),
(assign, reg0, 80),
(else_try),
(is_between, ":troop_level", 21, 26),
(assign, reg0, 120),
(else_try),
(is_between, ":troop_level", 26, 31),
(assign, reg0, 160),
(else_try),
(assign, reg0, 200),
(try_end),
(set_trigger_result, reg0),
]),