Nothing really too complicated about it. just need to change 2 lines of code if you are changing what what they give.Spoiler("ze_treasure",spr_use_time(4),"chest_b","bo_ze_treasure", [
(ti_on_scene_prop_use,
[
(store_trigger_param_1, ":agent_id"),
#(store_trigger_param_2, ":instance_id"),
#(neg|scene_prop_slot_eq, ":instance_id", scene_prop_slot_just_fired, 1), # abuse just_fired for already used.
(agent_is_active,":agent_id"),
(agent_is_alive,":agent_id"),
# remove his shit.
#(try_for_range_backwards,":equipment_slot",0,4), # ,ek_item_0,ek_head),
# (agent_get_item_slot, ":item_id", ":agent_id", ":equipment_slot"),
# (gt,":item_id",-1), # even have a item there?
# (agent_unequip_item, ":agent_id", ":item_id", ":equipment_slot"),
#(try_end),
(try_begin),
(agent_get_item_slot, ":item_id", ":agent_id", 4), #ek_head
(gt,":item_id",-1), # even have a item there?
(agent_unequip_item, ":agent_id", ":item_id", 4), #ek_head
(try_end),
# add ze goodies.
(agent_equip_item,":agent_id","itm_pirate_hat"),
#(agent_equip_item,":agent_id","itm_french_officer_pistol"),
#(agent_equip_item,":agent_id","itm_pistol_ammo"),
#(agent_equip_item,":agent_id","itm_spyglass"),
#(agent_equip_item,":agent_id","itm_french_light_cav_off_sabre"),
#(agent_set_wielded_item,":agent_id","itm_french_officer_pistol"),
#(scene_prop_set_slot,":instance_id",scene_prop_slot_just_fired,1),
(try_for_players, ":player_no", 1),
(player_is_active, ":player_no"),
(multiplayer_send_3_int_to_player, ":player_no", multiplayer_event_return_agent_set_item, ":agent_id", "itm_pirate_hat", 4),
(try_end),
]),
]),[close]
Nothing really too complicated about it. just need to change 2 lines of code if you are changing what what they give.Spoiler("ze_treasure",spr_use_time(4),"chest_b","bo_ze_treasure", [
(ti_on_scene_prop_use,
[
(store_trigger_param_1, ":agent_id"),
#(store_trigger_param_2, ":instance_id"),
#(neg|scene_prop_slot_eq, ":instance_id", scene_prop_slot_just_fired, 1), # abuse just_fired for already used.
(agent_is_active,":agent_id"),
(agent_is_alive,":agent_id"),
# remove his shit.
#(try_for_range_backwards,":equipment_slot",0,4), # ,ek_item_0,ek_head),
# (agent_get_item_slot, ":item_id", ":agent_id", ":equipment_slot"),
# (gt,":item_id",-1), # even have a item there?
# (agent_unequip_item, ":agent_id", ":item_id", ":equipment_slot"),
#(try_end),
(try_begin),
(agent_get_item_slot, ":item_id", ":agent_id", 4), #ek_head
(gt,":item_id",-1), # even have a item there?
(agent_unequip_item, ":agent_id", ":item_id", 4), #ek_head
(try_end),
# add ze goodies.
(agent_equip_item,":agent_id","itm_pirate_hat"),
#(agent_equip_item,":agent_id","itm_french_officer_pistol"),
#(agent_equip_item,":agent_id","itm_pistol_ammo"),
#(agent_equip_item,":agent_id","itm_spyglass"),
#(agent_equip_item,":agent_id","itm_french_light_cav_off_sabre"),
#(agent_set_wielded_item,":agent_id","itm_french_officer_pistol"),
#(scene_prop_set_slot,":instance_id",scene_prop_slot_just_fired,1),
(try_for_players, ":player_no", 1),
(player_is_active, ":player_no"),
(multiplayer_send_3_int_to_player, ":player_no", multiplayer_event_return_agent_set_item, ":agent_id", "itm_pirate_hat", 4),
(try_end),
]),
]),[close]
if you want to do stuff based on the variable one or two,(or both) you will have to get the variable of the prop in question(their are operations for that), check what the value is, and then code in what will happen if the variable = the value you want. you can find examples of that in the code. just look around the various files and see how it works.