How to make invoker do hand motions from orb casts

when invoker casts quas wex or exort he does some hand gesture as if he were throwing the orbs into the air. ive tried searching around but cant find anything.

the animation names are orb_spawn_lf and orb_spawn_rt but i dont know how to use them.

Comments

  • Posts: 71

    The animation library in Barebones may be what you are looking for

  • Posts: 112

    already looked there and it seems like nothing orb related is in the _ANIMATION_TRANSLATE_TO_CODE table.

    if this is what im looking for, how do i find the translate code for the animations

  • edited July 16 Posts: 58

    if that's the case i think you need to create your own model that's a copy of the original voker but you need to assign your own activity sequence labels

    actually i think you can write a model animation vscript and load it in with RegisterCustomAnimationScriptForModel( modelString, modelAnimationScriptString ) at the beginning of addon_game_mode.lua and inside the animation script you do

    model:CreateSequence(
    {
        name = "Orb_Spawn_Left",
        sequences = {
            { "orb_spawn_lf" }
        },
        fadeInTime = 0.2,
        fadeOutTime = 0.2,
        hidden = false,
        delta = true,
        activities = {
            { name = "YOUR_ACTIVITY_NAME_HERE", weight = 1 }
        },
        fps = 30
    } )
    
    model:CreateSequence(
    {
        name = "Orb_Spawn_Right",
        sequences = {
            { "orb_spawn_rt" }
        },
        fadeInTime = 0.2,
        fadeOutTime = 0.2,
        hidden = false,
        delta = true,
        activities = {
            { name = "YOUR_OTHER_ACTIVITY_NAME_HERE", weight = 1 }
        },
        fps = 30
    } )
    

    make sure to change YOUR_ACTIVITY_NAME_HERE and YOUR_OTHER_ACTIVITY_NAME_HERE to two unique activity sequence labels of your choice. they don't have to be ACT_DOTA_*. just go into the model editor and find some label in the activity sequence dropdown box. the labels you pick will be what you use to start the animation with StartGesture or barebones anim iibrary or whatever

  • edited July 16 Posts: 112

    alright so.. progress at least. sometimes he will do the hand motion properly, which is great! but most of the time he does this xd (also seems to have messed up some of his other animations)

    i used ACT_DOTA_OVERRIDE_ABILITY_1 and ACT_DOTA_OVERRIDE_ABILITY_2 in the code you linked because that's what i saw in the model editor. ill keep messing with it and see if i can make it work consistently.

    edit: copy pasted some stuff from an axe example and now it mostly works. the left one doesnt spaz out anymore, but 50% of the time he uses both hands instead of just left. right still spazzes out sometimes, not sure whats wrong with it.

    model:CreateSequence(
    {
        name = "Orb_Spawn_Left",
        sequences = {
            { "@orb_spawn_lf" }
        },
        framerangesequence = "@orb_spawn_lf",
        cmds = {
          { cmd = "sequence", sequence = "@orb_spawn_lf", dst = 1 },
          { cmd = "fetchframe", sequence = "@orb_spawn_lf", frame = 0, dst = 2 },
          { cmd = "subtract", dst = 1, src = 2 },
          { cmd = "add", dst = 0, src = 1 }
        },
        fadeInTime = 0.2,
        fadeOutTime = 0.2,
        hidden = false,
        delta = true,
        activities = {
            { name = "ACT_DOTA_OVERRIDE_ABILITY_1", weight = 1 }
        },
        fps = 30
    } )
    
    model:CreateSequence(
    {
        name = "Orb_Spawn_Right",
        sequences = {
            { "@orb_spawn_rt" }
        },
        framerangesequence = "@orb_spawn_rt",
        cmds = {
          { cmd = "sequence", sequence = "@orb_spawn_rt", dst = 1 },
          { cmd = "fetchframe", sequence = "@orb_spawn_rt", frame = 0, dst = 2 },
          { cmd = "subtract", dst = 1, src = 2 },
          { cmd = "add", dst = 0, src = 1 }
        },
        fadeInTime = 0.2,
        fadeOutTime = 0.2,
        hidden = false,
        delta = true,
        activities = {
            { name = "ACT_DOTA_OVERRIDE_ABILITY_2", weight = 1 }
        },
        fps = 30
    } )
    
  • try taking the delta = true line off each of the two. that should make it fuck up less, but it might cause voker to stop moving his legs to move his arms. keep me posted, i think i might know what to do in case that happens

  • edited July 16 Posts: 58

    to be honest i'm not sure what the @ prefix is supposed to signify. is that what the sequence is named in the invoker model (@orb_spawn_*)? otherwise you might just want to leave it out. also, check the console if there are any errors with the script. i think it doesn't like it when there's a sequence parameter in the same definition as framerangesequence, but i could be wrong

  • edited July 16 Posts: 58

    try this one.

    model:CreateSequence(
    {
        name = "Orb_Spawn_Left",
        framerangesequence = "orb_spawn_lf",
        cmds = {
          { cmd = "sequence", sequence = "orb_spawn_lf", dst = 1 },
          { cmd = "fetchframe", sequence = "idle", frame = 0, dst = 2 },
          { cmd = "subtract", dst = 1, src = 2 },
          { cmd = "add", dst = 0, src = 1 }
        },
        fadeInTime = 0.2,
        fadeOutTime = 0.2,
        hidden = false,
        delta = true,
        activities = {
            { name = "ACT_DOTA_OVERRIDE_ABILITY_1", weight = 1 }
        },
        fps = 30
    } )
    
    model:CreateSequence(
    {
        name = "Orb_Spawn_Right",
        framerangesequence = "orb_spawn_rt",
        cmds = {
          { cmd = "sequence", sequence = "orb_spawn_rt", dst = 1 },
          { cmd = "fetchframe", sequence = "idle", frame = 0, dst = 2 },
          { cmd = "subtract", dst = 1, src = 2 },
          { cmd = "add", dst = 0, src = 1 }
        },
        fadeInTime = 0.2,
        fadeOutTime = 0.2,
        hidden = false,
        delta = true,
        activities = {
            { name = "ACT_DOTA_OVERRIDE_ABILITY_2", weight = 1 }
        },
        fps = 30
    } )
    

    then if this is wonky, try replacing each instance of fetchframe with sequence.

  • edited July 17 Posts: 112

    You've been a great help, thank you. i did what you said replaced all fetchframe with sequence and got an error, but it works perfectly.

    Invalid parameter frame for cmd = "sequence"
    

    tried removing the frame = 0 from both of them but then it always used both hands and legs messed up too.

    i think im just gunna leave frame in there despite the error because it seems to work fine.

    ps: i was using @ because it was frequently used in the axe and legion examples, didnt seem to change anything though

  • edited July 17 Posts: 58

    oh, that's my bad. yeah you have to remove the frame param if you set it to sequence.

    well i haven't really seen any other resource on creating custom vscript animations elsewhere, so i'm more than happy to help. source1 models and animations used a qc system, and i'm trying to port a bunch of s1 models by transcribing the qc to vscript. i'm still not sure what a lot of it does though since most of it isn't really documented. https://developer.valvesoftware.com/wiki/Source_2_Animation_System_VScript_API

    problem is without being able to see the base animations/original animation script, we have to reconstruct the animations from scratch. i think what's lacking might be a weightlist to designate which bones to do the animation on, so try putting this at the top of the vscript

    model:CreateWeightlist( 
        "Arms",
        {
            { "Root_0", 0 },
                { "thigh_R", 0 },
                { "thigh_L", 0 },
                { "Spine_0", 0 },
                    { "Spine_1", 0 },
                        { "clavicle_L", 1 },
                        { "clavicle_R", 1 },
        }
    )
    

    then use this for the sequence definitions

    model:CreateSequence(
    {
        name = "Orb_Spawn_Left",
        sequences = {
            { "orb_spawn_lf" }
        },
        fadeInTime = 0.2,
        fadeOutTime = 0.2,
        hidden = false,
        weightlist = "Arms",
        activities = {
            { name = "ACT_DOTA_OVERRIDE_ABILITY_1", weight = 1 }
        },
        fps = 30
    } )
    
    model:CreateSequence(
    {
        name = "Orb_Spawn_Right",
        sequences = {
            { "orb_spawn_rt" }
        },
        fadeInTime = 0.2,
        fadeOutTime = 0.2,
        hidden = false,
        weightlist = "Arms",
        activities = {
            { name = "ACT_DOTA_OVERRIDE_ABILITY_2", weight = 1 }
        },
        fps = 30
    } )
    

    let me know how voker reacts. we'll just narrow the variables down.

  • Posts: 112

    the called hand will always play the hand animation correctly, but somtimes the opposite hand will also play and when it does the opposite hand will violently teleport around.

  • let's split the weightlist in left and right hands only then

    model:CreateWeightlist( 
        "Arm_Left",
        {
            { "Root_0", 0 },
                { "thigh_R", 0 },
                { "thigh_L", 0 },
                { "Spine_0", 0 },
                    { "Spine_1", 1 },
                        { "clavicle_L", 1 },
                        { "clavicle_R", 0 },
        }
    )
    
    model:CreateWeightlist( 
        "Arm_Right",
        {
            { "Root_0", 0 },
                { "thigh_R", 0 },
                { "thigh_L", 0 },
                { "Spine_0", 0 },
                    { "Spine_1", 1 },
                        { "clavicle_L", 0 },
                        { "clavicle_R", 1 },
        }
    )
    

    then set the Orb_Spawn_Left's weightlist to Arm_Left and Orb_Spawn_Right's to Arm_Right

  • Posts: 112

    opposite arm still plays sometimes but its not as spazzy, it kind of flashes throughout the animation

  • Posts: 387

    How are you playing the animations? Screw the animation scripts, this should be just hero:StartGesture(ACT_DOTA_OVERRIDE_ABILITY_1)

  • Posts: 112

    :sweat_smile: thanks DoctorGester, works just fine.

  • edited July 18 Posts: 58

    i used ACT_DOTA_OVERRIDE_ABILITY_1 and ACT_DOTA_OVERRIDE_ABILITY_2 in the code you linked because that's what i saw in the model editor. ill keep messing with it and see if i can make it work consistently.

    oh, didn't realise that those were the actual sequence reference names for the orb anims. did you use the vmdl_c voker? or did you have a decompiled copy?

  • Posts: 112

    i just used this path. and for the model i was viewing i just typed in "invoker" in hammer

    RegisterCustomAnimationScriptForModel("models/heroes/invoker/invoker.vmdl", "animation/invoker_orbs")