Claw (test version+video)

Users who are viewing this thread

Hurleur

Grandmaster Knight
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

    ( 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, ":eek: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", ":eek: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
 
As far as I can tell, this code is absolutely meaningless. What is it supposed to do?

Also, if you post with OSP tag, please post a complete solution, not just part of it. Your script is referencing an item which does not exist in Native, in other words, it will not work out of the box.
 
he means this code makes your gloves like a claw (scratching for example), you can change the model into any gauntlet or make your own model.

thnx for the OSP anyways  :lol:
 
Lav said:
As far as I can tell, this code is absolutely meaningless. What is it supposed to do?

Also, if you post with OSP tag, please post a complete solution, not just part of it. Your script is referencing an item which does not exist in Native, in other words, it will not work out of the box.
OOps i copy paste in haste before going to work, i forgrt the second trigger used for dammage dealing.  :oops:
I will upload the model , but the code itself works .(except the damage*)  *Will be completed in  about 7 hour.

It can bed used for make someone like Wolverine (x-men character) .
I try explain how it works :

When you press "t" , it check if the player has the item(gauntlet) equiped .
If yes , unequip the gauntlet and all the weapon slot item , and equip the (gauntlet with claw) .
if the player has no item , the agent use the punch animation for attack , this is the best Warband animation for the claw.

When press t again it reverse the operation
Damage are dealed with xenoargh damage script (witch is the  trigger if forget to post)

Sorry for putting OSP tag , and sorry to post my code.


 
this gives a great idea, for a multiplayer mod something like "WolfTeam" where you can be a human or press 3 to transfer into wolf, with strong 1 hit kill on humans, but humans have guns!
 
I am still not getting it. Post all your code, maybe we can make something out of it.
 
Back
Top Bottom