Hi i am a beginner at codding , so there is certainly a more elegant way to make this work , and i have certainly forgot some detail.
But this work with a just little bug when you press "t" for the first timeas far as i know.
Actually it work only for the gauntlet , there is certainly a way to do this for all gloves, but i do not need this.
Paste this under any mission template
link for the gauntlet with claw model
https://dl.dropbox.com/u/99160115/armes.brf
paste this in module_item.py
It work for me , without any compiling error or any message in game , but i olny test it under "quick_battle_battle" mission template .
Once again i want to says that that's certainly a weird code , and there is some part where a lot of work is needed but the concept works.
A video link for show how it works
http://youtu.be/IUbRQlG49k4
But this work with a just little bug when you press "t" for the first timeas far as i know.
Actually it work only for the gauntlet , there is certainly a way to do this for all gloves, but i do not need this.
Paste this under any mission template
( 0, 0, 0, [(key_clicked, key_t),(neg|main_hero_fallen)],
[
(get_player_agent_no, ":player_agent"),
(agent_is_active, ":player_agent"),
(try_begin),
( agent_has_item_equipped, ":player_agent", "itm_gauntlets"),
(agent_get_item_slot,":item_0", ":player_agent", 0),
(agent_unequip_item, ":player_agent", "itm_gauntlets"),
(agent_equip_item, ":player_agent", "itm_claws"),
(agent_equip_item, ":player_agent", "itm_jarid_melee",1), ## i give weapon to weapon slot
(agent_equip_item, ":player_agent", "itm_jarid_melee",2),
(agent_equip_item, ":player_agent", "itm_jarid_melee",3),
(agent_equip_item, ":player_agent", "itm_jarid_melee",4),
(agent_get_item_slot, ":weapon1",":player_agent", 0), ### then i unequip all weapon slot item
(agent_get_item_slot, ":weapon2",":player_agent", 1),
(agent_get_item_slot, ":weapon3",":player_agent", 2),
(agent_get_item_slot, ":weapon4",":player_agent", 3),
(agent_unequip_item, ":player_agent", ":weapon1"),, ### then i unequip all weapon slot item
(agent_unequip_item, ":player_agent", ":weapon2"), #cause the agent must not have weapon for use the punch animation.
(agent_unequip_item, ":player_agent", ":weapon3"),
(agent_unequip_item, ":player_agent", ":weapon4"),
(else_try),
( agent_has_item_equipped, ":player_agent", "itm_claws"),
(agent_get_troop_id, ":troop", ":player_agent"),
(troop_get_inventory_slot,":item_0", ":troop", 0),
(troop_get_inventory_slot,":item_1", ":troop", 1),
(agent_unequip_item, ":player_agent", "itm_claws"),
(agent_equip_item, ":player_agent", "itm_gauntlets"),
(agent_equip_item, ":player_agent", ":item_0",1),
(agent_equip_item, ":player_agent", ":item_1",2),
]),
#Damage simulation code by xenoargh modified for deal damage with claw
(ti_on_agent_hit, 0, 0, [],
[
(store_trigger_param_1, ":agent"),
(store_trigger_param_2, ":attacker"),
(store_trigger_param_3, ":damage"),
(store_trigger_param_3, "rig_damage"),
(try_begin),
( agent_has_item_equipped, ":attacker", "itm_claws"),
(play_sound,"snd_metal_hit_low_armor_high_damage"),
(assign, ":damage", 200),
(store_sub, ":diff_damage", ":damage", "rig_damage"),
(val_mul, ":diff_damage", -1),
(store_agent_hit_points, ":hitpoints" , ":agent", 1),
(val_add, ":hitpoints", ":diff_damage"),
(agent_set_hit_points,":agent",":hitpoints",1),
(try_end),
]),
[
(get_player_agent_no, ":player_agent"),
(agent_is_active, ":player_agent"),
(try_begin),
( agent_has_item_equipped, ":player_agent", "itm_gauntlets"),
(agent_get_item_slot,":item_0", ":player_agent", 0),
(agent_unequip_item, ":player_agent", "itm_gauntlets"),
(agent_equip_item, ":player_agent", "itm_claws"),
(agent_equip_item, ":player_agent", "itm_jarid_melee",1), ## i give weapon to weapon slot
(agent_equip_item, ":player_agent", "itm_jarid_melee",2),
(agent_equip_item, ":player_agent", "itm_jarid_melee",3),
(agent_equip_item, ":player_agent", "itm_jarid_melee",4),
(agent_get_item_slot, ":weapon1",":player_agent", 0), ### then i unequip all weapon slot item
(agent_get_item_slot, ":weapon2",":player_agent", 1),
(agent_get_item_slot, ":weapon3",":player_agent", 2),
(agent_get_item_slot, ":weapon4",":player_agent", 3),
(agent_unequip_item, ":player_agent", ":weapon1"),, ### then i unequip all weapon slot item
(agent_unequip_item, ":player_agent", ":weapon2"), #cause the agent must not have weapon for use the punch animation.
(agent_unequip_item, ":player_agent", ":weapon3"),
(agent_unequip_item, ":player_agent", ":weapon4"),
(else_try),
( agent_has_item_equipped, ":player_agent", "itm_claws"),
(agent_get_troop_id, ":troop", ":player_agent"),
(troop_get_inventory_slot,":item_0", ":troop", 0),
(troop_get_inventory_slot,":item_1", ":troop", 1),
(agent_unequip_item, ":player_agent", "itm_claws"),
(agent_equip_item, ":player_agent", "itm_gauntlets"),
(agent_equip_item, ":player_agent", ":item_0",1),
(agent_equip_item, ":player_agent", ":item_1",2),
]),
#Damage simulation code by xenoargh modified for deal damage with claw
(ti_on_agent_hit, 0, 0, [],
[
(store_trigger_param_1, ":agent"),
(store_trigger_param_2, ":attacker"),
(store_trigger_param_3, ":damage"),
(store_trigger_param_3, "rig_damage"),
(try_begin),
( agent_has_item_equipped, ":attacker", "itm_claws"),
(play_sound,"snd_metal_hit_low_armor_high_damage"),
(assign, ":damage", 200),
(store_sub, ":diff_damage", ":damage", "rig_damage"),
(val_mul, ":diff_damage", -1),
(store_agent_hit_points, ":hitpoints" , ":agent", 1),
(val_add, ":hitpoints", ":diff_damage"),
(agent_set_hit_points,":agent",":hitpoints",1),
(try_end),
]),
link for the gauntlet with claw model
https://dl.dropbox.com/u/99160115/armes.brf
paste this in module_item.py
["claws","claws", [("claws_L",0),("claws",imodbit_reinforced)], itp_merchandise|itp_type_hand_armor,0, 1040, weight(1.0)|abundance(100)|body_armor(6)|difficulty(0),imodbits_armor],
It work for me , without any compiling error or any message in game , but i olny test it under "quick_battle_battle" mission template .
Once again i want to says that that's certainly a weird code , and there is some part where a lot of work is needed but the concept works.
A video link for show how it works
http://youtu.be/IUbRQlG49k4