1. This forum is ARCHIVED! Visit the new Cloud Sixteen forums, codename Eden, at https://eden.cloudsixteen.com. These forums will remain archived for a few months before being closed down, so try to encourage plugin developers to begin moving their content across to the new forums.
Dismiss Notice
Hi Guest, you need a Steam account to register and post on these forums. Login with Steam at the top of the forums to get started!
Dismiss Notice
Hi Guest, do you want to buy HL2RP or another Clockwork schema? Visit the Cloud Sixteen Store to get started!

How to modify animations?

Discussion in 'Development' started by Dr. sandu, Dec 29, 2015.

  1. Dr. sandu

    Dr. sandu Clockwork Customer

    From what i've seen clockwork has functions to do at least the following:
    draw models of items that are equipped but not in use on the player's back (secondary) or the player's right leg (primary), these models are parented to certain bones.
    Change hold animation based on if the weapon is raised or not.

    What i want to know is where the code for these functions is located because as it is now the hold animations are clipping badly for certain weapons and i can't use the items' default animations (for example a SWEP's holdtype) because CW overwrites them somehow.
     
    Last edited: Dec 29, 2015
  2. Dr. sandu

    Dr. sandu Clockwork Customer

    Edit: figured it out with angel, more or less.
     
  3. Svensis

    Svensis Guest

    Wanna share how you did it? would be nice as others may be in a such problem too?
     
  4. Dr. sandu

    Dr. sandu Clockwork Customer

    Oh shit i forgot to check back on this thread, some of the code i was looking for was in sh_animation.lua in the clockwork library folder, it has code for holdtypes and such, look it up yourself for more detail. No idea where the code for ''equipment'' (stuff that gets drawn on the model when holstered) is though.
    I do have a new problem as of this moment.
    I made a plugin of a set of new animation tables for models with the animation sequence names correct (i hope). The plugin seems to work as when i use /charsetmodel to change my model to one named in the plugin it changes the model and all animations are as they should be (in third person) all but when i hold my keyes and hands or otherwise want to use an idel stance, it uses the 9mm pistol's hold animations, i also tried rewriting some of the pistol's animations to an idle animation with no succes.
    My plugin code:

    -- A function to add a Combine rogue model.
    function Clockwork.animation:AddCombineRogueModel(model)
    return self:AddModel("combineRogue", model);
    end;

    Clockwork.animation:AddCombineRogueModel("models/player/01ar_combine_soldier01.mdl");
    Clockwork.animation:AddCombineRogueModel("models/player/01ar_combine_soldier02.mdl");
    Clockwork.animation:AddCombineRogueModel("models/player/ar_combine_soldier03b.mdl");

    Clockwork.animation.stored.combineRogue = {
    ["crouch_grenade_aim_idle"] = ACT_HL2MP_IDLE_CROUCH_GRENADE,
    ["crouch_grenade_aim_walk"] = ACT_HL2MP_WALK_CROUCH_GRENADE,
    ["stand_grenade_aim_idle"] = ACT_HL2MP_IDLE_GRENADE,
    ["crouch_pistol_aim_idle"] = ACT_HL2MP_IDLE_CROUCH_PISTOL,
    ["stand_grenade_aim_walk"] = ACT_HL2MP_WALK_GRENADE,
    ["crouch_pistol_aim_walk"] = ACT_HL2MP_WALK_CROUCH_PISTOL,
    ["crouch_heavy_aim_idle"] = ACT_HL2MP_IDLE_CROUCH_PHYSGUN,
    ["crouch_blunt_aim_idle"] = ACT_HL2MP_IDLE_CROUCH_MELEE,
    ["stand_grenade_aim_run"] = ACT_HL2MP_RUN_GRENADE,
    ["crouch_blunt_aim_walk"] = ACT_HL2MP_WALK_CROUCH_MELEE,
    ["crouch_heavy_aim_walk"] = ACT_HL2MP_WALK_CROUCH_PHYSGUN,
    ["stand_pistol_aim_walk"] = ACT_HL2MP_WALK_RPG,
    ["stand_pistol_aim_idle"] = ACT_HL2MP_IDLE_CROUCH_GRENADE,
    ["crouch_fist_aim_walk"] = ACT_HL2MP_WALK_CROUCH_FIST,
    ["crouch_slam_aim_walk"] = ACT_HL2MP_WALK_CROUCH_SLAM,
    ["stand_pistol_aim_run"] = ACT_HL2MP_RUN_GRENADE,
    ["crouch_fist_aim_idle"] = ACT_HL2MP_IDLE_CROUCH,
    ["stand_heavy_aim_idle"] = ACT_HL2MP_IDLE_RPG,
    ["stand_blunt_aim_idle"] = ACT_HL2MP_IDLE_MELEE,
    ["crouch_slam_aim_idle"] = ACT_HL2MP_IDLE_CROUCH_SLAM,
    ["stand_blunt_aim_walk"] = ACT_HL2MP_WALK_MELEE,
    ["stand_heavy_aim_walk"] = ACT_HL2MP_WALK_RPG,
    ["stand_fist_aim_idle"] = ACT_HL2MP_IDLE,
    ["crouch_smg_aim_walk"] = ACT_HL2MP_WALK_SMG1,
    ["crouch_smg_aim_idle"] = ACT_HL2MP_IDLE_CROUCH_SMG1,
    ["stand_fist_aim_walk"] = ACT_WALK,
    ["stand_blunt_aim_run"] = ACT_HL2MP_RUN_MELEE,
    ["stand_heavy_aim_run"] = ACT_HL2MP_RUN_RPG,
    ["crouch_grenade_walk"] = ACT_HL2MP_WALK_CROUCH_GRENADE,
    ["crouch_grenade_idle"] = ACT_HL2MP_IDLE_CROUCH_GRENADE,
    ["stand_slam_aim_idle"] = ACT_HL2MP_IDLE_SLAM,
    ["stand_slam_aim_walk"] = ACT_HL2MP_WALK_SLAM,
    ["stand_slam_aim_run"] = ACT_HL2MP_RUN_SLAM,
    ["stand_smg_aim_idle"] = ACT_HL2MP_IDLE_SMG1,
    ["stand_smg_aim_walk"] = ACT_HL2MP_WALK_SMG1,
    ["stand_fist_aim_run"] = ACT_HL2MP_RUN,
    ["crouch_pistol_idle"] = ACT_HL2MP_IDLE_CROUCH_PISTOL,
    ["stand_grenade_walk"] = ACT_HL2MP_WALK_GRENADE,
    ["crouch_pistol_walk"] = ACT_HL2MP_WALK_CROUCH_PISTOL,
    ["stand_grenade_idle"] = ACT_HL2MP_IDLE_GRENADE,
    ["stand_grenade_run"] = ACT_HL2MP_RUN_GRENADE,
    ["crouch_blunt_idle"] = ACT_HL2MP_IDLE_CROUCH_MELEE,
    ["stand_pistol_walk"] = ACT_HL2MP_WALK_PISTOL,
    ["crouch_blunt_walk"] = ACT_HL2MP_WALK_CROUCH_MELEE,
    ["crouch_heavy_walk"] = ACT_HL2MP_WALK_CROUCH_RPG,
    ["stand_pistol_idle"] = ACT_HL2MP_IDLE,
    ["crouch_heavy_idle"] = ACT_HL2MP_IDLE_CROUCH_RPG,
    ["stand_smg_aim_run"] = ACT_HL2MP_RUN_SMG1,
    ["stand_heavy_walk"] = ACT_HL2MP_WALK_RPG,
    ["stand_blunt_walk"] = ACT_HL2MP_WALK_MELEE,
    ["stand_blunt_idle"] = ACT_HL2MP_IDLE_MELEE,
    ["crouch_fist_idle"] = ACT_HL2MP_IDLE_CROUCH,
    ["crouch_fist_walk"] = ACT_HL2MP_WALK_CROUCH,
    ["crouch_slam_idle"] = ACT_HL2MP_IDLE_CROUCH_SLAM,
    ["stand_pistol_run"] = ACT_HL2MP_RUN_PISTOL,
    ["stand_heavy_idle"] = ACT_HL2MP_IDLE_RPG,
    ["crouch_slam_walk"] = ACT_HL2MP_WALK_CROUCH_SLAM,
    ["stand_heavy_run"] = ACT_HL2MP_RUN_RPG,
    ["stand_slam_idle"] = ACT_HL2MP_IDLE_SLAM,
    ["stand_fist_walk"] = ACT_WALK,
    ["stand_slam_walk"] = ACT_HL2MP_WALK_SLAM,
    ["stand_blunt_run"] = ACT_HL2MP_RUN_MELEE,
    ["crouch_smg_walk"] = ACT_HL2MP_WALK_CROUCH_SMG1,
    ["crouch_smg_idle"] = ACT_HL2MP_IDLE_CROUCH_SMG1,
    ["stand_fist_idle"] = ACT_HL2MP_IDLE,
    ["stand_slam_run"] = ACT_HL2MP_RUN_SLAM,
    ["grenade_attack"] = ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE,
    ["stand_smg_idle"] = ACT_HL2MP_IDLE_SMG1,
    ["stand_fist_run"] = ACT_HL2MP_RUN,
    ["stand_smg_walk"] = ACT_HL2MP_WALK_SMG1,
    ["pistol_attack"] = ACT_HL2MP_GESTURE_RANGE_ATTACK_PISTOL,
    ["stand_smg_run"] = ACT_HL2MP_RUN_SMG1,
    ["pistol_reload"] = ACT_RELOAD_PISTOL,
    ["heavy_reload"] = ACT_HL2MP_GESTURE_RANGE_ATTACK_RPG,
    ["heavy_attack"] = ACT_HL2MP_GESTURE_RANGE_ATTACK_RPG,
    ["blunt_attack"] = ACT_HL2MP_GESTURE_RANGE_ATTACK_MELEE,
    ["crouch_idle"] = ACT_HL2MP_IDLE_CROUCH,
    ["crouch_walk"] = ACT_HL2MP_WALK_CROUCH,
    ["slam_attack"] = ACT_HL2MP_GESTURE_RANGE_ATTACK_SLAM,
    ["stand_idle"] = ACT_HL2MP_IDLE,
    ["stand_walk"] = ACT_WALK,
    ["smg_attack"] = ACT_HL2MP_GESTURE_RANGE_ATTACK_SMG1,
    ["smg_reload"] = ACT_HL2MP_GESTURE_RELOAD_SMG1,
    ["stand_run"] = ACT_HL2MP_RUN,
    ["jump"] = ACT_JUMP,
    ["sit"] = ACT_GMOD_SIT_ROLLERCOASTER
    };

    i looked up the animation sequence names by viewing them in hammer editor.
     

Previous Readers (Total: 0)