Lately I've been working on an AIO (All-in-one) viewmodel that's basically just a pair of hands that can have weapon world models bone merged to, but the problem is that I want to play a sequence for example; called 'melee_attack0'.
Now if I include the parameters 'activity 1 -1' in the .QC for that sequence, and try to play animation 1 in-game; it doesn't play the sequence or do anything.
[lua]$modelname "valhalla/v_hands.mdl"
$body "body" "hands.smd"
$cdmaterials "valhalla/weapons/hands/"
$attachment "anim_attachment_RH" "ValveBiped.Anim_Attachment_RH" 0 0 0 rotate 0 0 0
$attachment "weapon_RH" "R_Weapon" 0 0 0 rotate 0 0 0
$sequence "idle_melee0" "anims/idle_melee0" activity 1 -1 fps 30 loop
$sequence "slash_melee0" "anims/slash_melee0" activity 10 -1 fps 30
$sequence "grab_small0" "anims/grab_small0" activity 20 -1 fps 35[/lua]
Does anybody know if I'm doing something incorrectly?
This does nothing:
[lua]self.Weapon:SendWeaponAnim( 10 );[/lua]
You should try naming your activities something else than numbers, e.g. ACT_WHATEVER
[QUOTE=MaxOfS2D;40384468]You should try naming your activities something else than numbers, e.g. ACT_WHATEVER[/QUOTE]
Aren't the ACT_ variables limited to what ever is already defined when compiling a model? I wanted to create my own like 'ACT_VM_MELEE_SLASH'.
I can't use strings since SendWeaponAnim only takes a number as a parameter, and I couldn't find anything like SetSequence for the weapon class.
Alright well I guess the question should be more like "How can I play activities by their index, rather."
I've tried giving the sequence activity parameter the index let's say 10, and tried to send the weapon animation 10 but it doesn't do anything. So I guess I'm S.O.L. v:v:v
Sorry, you need to Log In to post a reply to this thread.