Where is it?or use WSE2
Whenever I need your advice, I'll ask it.Maybe use that money you offered in another thread (puny 2 USD) to get yourself some newer OS.
try_for_agents
operation in multiplayer.("mgw_test", [ #used to dev
(entry_point_get_position, pos1, 0),
(store_current_scene, ":scene_no"),
(modify_visitors_at_site, ":scene_no"),
(add_visitors_to_current_scene, 0, "trp_kingdom_1_lady_1", 10, 0, 0),
(try_for_agents, ":agent", pos1, 5000),
(agent_get_troop_id, reg0, ":agent"),
(display_message, reg0),
(display_message, "@Ok."),
(try_end),
]),
try_for_agents
but it's not working.(ti_after_mission_start, 0, 0, [], [
(assign, "$spawn", 1),
]),
(0, 0, 0, [], [
(multiplayer_is_server),
(eq, "$spawn", 1),
(try_begin),
(assign, "$spawn", 0),
(store_current_scene, ":scene_no"),
(modify_visitors_at_site, ":scene_no"),
(add_visitors_to_current_scene, 0, "trp_kingdom_1_lady_1", 10, 0, 0),
(try_end),
]),
(ti_inventory_key_pressed, 0, 0, [], [
(multiplayer_is_server),
(display_message, "@Ok"),
(call_script, "script_mgw_test"),
]),
("mgw_test", [ #used to dev
(try_for_agents, ":agent"),
(agent_is_non_player, ":agent"),
(agent_is_alive, ":agent"),
(agent_get_troop_id, ":trp", ":agent"),
(troop_set_health, ":trp", 0),
(try_end),
]),
("mgw_test", [ #used to dev
(try_for_agents, ":agent"),
(agent_is_non_player, ":agent"),
(agent_is_alive, ":agent"),
(agent_set_hit_points, ":agent", 0),
(try_end),
]),
agent_set_hit_points = 1721 # set absolute to 1 if value is absolute, otherwise value will be treated as relative number in range [0..100]
# (agent_set_hit_points,<agent_id>,<value>,[absolute]),
I've usedYou should try agent_set_hit_points instead of troop_set_health.
Code:("mgw_test", [ #used to dev (try_for_agents, ":agent"), (agent_is_non_player, ":agent"), (agent_is_alive, ":agent"), (agent_set_hit_points, ":agent", 0), (try_end), ]),
Code:agent_set_hit_points = 1721 # set absolute to 1 if value is absolute, otherwise value will be treated as relative number in range [0..100] # (agent_set_hit_points,<agent_id>,<value>,[absolute]),
(remove_agent, ":agent"); should work aswell.
Does the agent spawning work in meanwhile? Or do they still not spawn?
agent_deliver_damage_to_agent
and it's work, thank you @Gotha.