MadocComadrin said:Is there any way to get all of the items an agent has currently equipped? (I need to tell if an agent/player (multiplayer) has more of one type of item and if they have a weapon space free)
Excellent! You have helped me get one step closer to world domination. When I'm done with my conquest, you will receive a charming fruit basket and a gift card to Olive Garden.Caba`drin said:MadocComadrin said:Is there any way to get all of the items an agent has currently equipped? (I need to tell if an agent/player (multiplayer) has more of one type of item and if they have a weapon space free)
Module System 1.134 is out...with something that should be of help to you:
(agent_get_item_slot, <destination>, <agent_id>, <value>), value between 0-7, order is weapon1, weapon2, weapon3, weapon4, head_armor, body_armor, leg_armor, hand_armor (the appropriate ek_slots)
Possibly also useful for this:
ti_on_item_picked_up
ti_on_item_dropped
ti_on_item_wielded
ti_on_item_unwielded
You will never accomplish it. As I type this my men a closing in on your position.Excellent! You have helped me get one step closer to world domination. When I'm done with my conquest, you will receive a charming fruit basket and a gift card to Olive Garden.
(scene_prop_get_num_instances, ":max_bullets", "spr_bullet_a"),
(try_for_range, ":cur_bullet", 0, ":max_bullets"),
(prop_instance_get_position, pos3, ":cur_bullet"),
(position_get_distance_to_ground_level, ":ground_distance", pos3),
(le, ":ground_distance", 0),
(prop_instance_stop_animating, ":cur_bullet"),
(scene_prop_set_visibility, ":cur_bullet", 0),
(try_end),
(scene_prop_get_instance, ":bullet_id", "spr_bullet_a", ":cur_bullet"),
(multiplayer_get_my_player, ":my_player"),
(player_get_agent_id, ":player_agent", ":my_player"),
(agent_get_wielded_item, ":wielded_item", ":player_agent", 0),
(try_begin),
(this_or_next|eq, ":scene_prop_id", "spr_mp_cannon_3lb"),
(this_or_next|eq, ":scene_prop_id", "spr_mp_cannon_6lb"),
(eq, ":scene_prop_id", "spr_mp_cannon_12lb"),
(scene_prop_get_slot, ":reloaded", ":instance_id", mp_cannon_reload),
(try_begin),
(eq, ":reloaded", 0),
(this_or_next|eq, ":wielded_item", "itm_cannonball_3lb"),
(this_or_next|eq, ":wielded_item", "itm_cannonball_6lb"),
(eq, ":wielded_item", "itm_cannonball_12lb"),
(str_store_string, s0, "str_cannon_reload_0_cannonball"),
(else_try),
(eq, ":reloaded", 0),
(this_or_next|neq, ":wielded_item", "itm_cannonball_3lb"),
(this_or_next|neq, ":wielded_item", "itm_cannonball_6lb"),
(neq, ":wielded_item", "itm_cannonball_12lb"),
(str_store_string, s0, "str_cannon_reload_0_no_cannonball"),
(else_try),
(eq, ":reloaded", 1),
(eq, ":wielded_item", "itm_ramrod"),
(str_store_string, s0, "str_cannon_reload_1_ramrod"),
(else_try),
(eq, ":reloaded", 1),
(neq, ":wielded_item", "itm_ramrod"),
(str_store_string, s0, "str_cannon_reload_1_no_ramrod"),
(else_try),
(eq, ":reloaded", 2),
(eq, ":wielded_item", "itm_linstock"),
(str_store_string, s0, "str_cannon_reload_2_linstock"),
(else_try),
(eq, ":reloaded", 2),
(neq, ":wielded_item", "itm_linstock"),
(str_store_string, s0, "str_cannon_reload_2_no_linstock"),
(try_end),
(try_end),
(multiplayer_get_my_player, ":my_player"),
(player_get_agent_id, ":player_agent", ":my_player"),
(agent_get_wielded_item, ":wielded_item", ":player_agent", 0),
(scene_prop_get_slot, ":reloaded", ":instance_id", mp_cannon_reload),
(try_begin),
(eq, ":scene_prop_id", "spr_mp_cannon_3lb"),
(try_begin),
(eq, ":reloaded", 0),
(eq, ":wielded_item", "itm_cannonball_3lb"),
(str_store_string, s0, "str_cannon_reload_0_cannonball"),
(else_try),
(eq, ":reloaded", 0),
(neq, ":wielded_item", "itm_cannonball_3lb"),
(str_store_string, s0, "str_cannon_reload_0_no_cannonball"),
(try_end),
(else_try),
(eq, ":scene_prop_id", "spr_mp_cannon_6lb"),
(try_begin),
(eq, ":reloaded", 0),
(eq, ":wielded_item", "itm_cannonball_6lb"),
(str_store_string, s0, "str_cannon_reload_0_cannonball"),
(else_try),
(eq, ":reloaded", 0),
(neq, ":wielded_item", "itm_cannonball_6lb"),
(str_store_string, s0, "str_cannon_reload_0_no_cannonball"),
(try_end),
(else_try),
(eq, ":scene_prop_id", "spr_mp_cannon_12lb"),
(try_begin),
(eq, ":reloaded", 0),
(eq, ":wielded_item", "itm_cannonball_12lb"),
(str_store_string, s0, "str_cannon_reload_0_cannonball"),
(else_try),
(eq, ":reloaded", 0),
(neq, ":wielded_item", "itm_cannonball_12lb"),
(str_store_string, s0, "str_cannon_reload_0_no_cannonball"),
(try_end),
(try_end),
(try_begin),
(eq, ":reloaded", 1),
(eq, ":wielded_item", "itm_ramrod"),
(str_store_string, s0, "str_cannon_reload_1_ramrod"),
(else_try),
(eq, ":reloaded", 1),
(neq, ":wielded_item", "itm_ramrod"),
(str_store_string, s0, "str_cannon_reload_1_no_ramrod"),
(else_try),
(eq, ":reloaded", 2),
(eq, ":wielded_item", "itm_linstock"),
(str_store_string, s0, "str_cannon_reload_2_linstock"),
(else_try),
(eq, ":reloaded", 2),
(neq, ":wielded_item", "itm_linstock"),
(str_store_string, s0, "str_cannon_reload_2_no_linstock"),
(try_end),
Yeah, that takes care of the cannonballs, but the problem with the dedicated server still remains.ithilienranger said:It looks like you can load any size cannonball into any size cannon with your code. Also, you can output or store literal strings using @. (str_store_string, s0, "@Cannon is loaded"),
Try this or if the items are in a row you could shorten it with a try for range.
Code:(multiplayer_get_my_player, ":my_player"), (player_get_agent_id, ":player_agent", ":my_player"), (agent_get_wielded_item, ":wielded_item", ":player_agent", 0), (scene_prop_get_slot, ":reloaded", ":instance_id", mp_cannon_reload), (try_begin), (eq, ":scene_prop_id", "spr_mp_cannon_3lb"), (try_begin), (eq, ":reloaded", 0), (eq, ":wielded_item", "itm_cannonball_3lb"), (str_store_string, s0, "str_cannon_reload_0_cannonball"), (else_try), (eq, ":reloaded", 0), (neq, ":wielded_item", "itm_cannonball_3lb"), (str_store_string, s0, "str_cannon_reload_0_no_cannonball"), (try_end), (else_try), (eq, ":scene_prop_id", "spr_mp_cannon_6lb"), (try_begin), (eq, ":reloaded", 0), (eq, ":wielded_item", "itm_cannonball_6lb"), (str_store_string, s0, "str_cannon_reload_0_cannonball"), (else_try), (eq, ":reloaded", 0), (neq, ":wielded_item", "itm_cannonball_6lb"), (str_store_string, s0, "str_cannon_reload_0_no_cannonball"), (try_end), (else_try), (eq, ":scene_prop_id", "spr_mp_cannon_12lb"), (try_begin), (eq, ":reloaded", 0), (eq, ":wielded_item", "itm_cannonball_12lb"), (str_store_string, s0, "str_cannon_reload_0_cannonball"), (else_try), (eq, ":reloaded", 0), (neq, ":wielded_item", "itm_cannonball_12lb"), (str_store_string, s0, "str_cannon_reload_0_no_cannonball"), (try_end), (try_end), (try_begin), (eq, ":reloaded", 1), (eq, ":wielded_item", "itm_ramrod"), (str_store_string, s0, "str_cannon_reload_1_ramrod"), (else_try), (eq, ":reloaded", 1), (neq, ":wielded_item", "itm_ramrod"), (str_store_string, s0, "str_cannon_reload_1_no_ramrod"), (else_try), (eq, ":reloaded", 2), (eq, ":wielded_item", "itm_linstock"), (str_store_string, s0, "str_cannon_reload_2_linstock"), (else_try), (eq, ":reloaded", 2), (neq, ":wielded_item", "itm_linstock"), (str_store_string, s0, "str_cannon_reload_2_no_linstock"), (try_end),
Try rename your meshes to "HK2" & "bo_HK2". Game naming convention uses .X at the end of mesh names as a multimesh indicator, maybe this gets in the way, as colmeshes can't me multyBeobart said:("HK_Wall" ,0,"HK2.3" ,"bo_HK2.3" , []),