AOC weapons and player model anims

have the AOC weapon and player anims been mapped out yet? i wana make a little gamemode using the aoc content but i rather not figure it all out myself if its allready been figured out.

any easy way to use the HL2 Model viewer on aoc content?

[editline]27th July 2011[/editline]

okay i had a derp moment, extracted the models into my tf2 directory and used the model viewer, so now i have the anim names but i need to convert them to their number… fffuuu… any ideas

You could check them by activity and do Entity:SelectWeightedSequence( ACT_ ) if the activity is defined, or Entity:LookupSequence( “sequence” ) and Reset/SetSequence from there.

oh, hey thanks :smiley: ill check that out, Select weighted sequence wouldnt work because that takes a number and ACT_AOC_STAB and such would all be nil

[editline]27th July 2011[/editline]

okay, ACT_AOC_SWING1 translates to 4… but when i play 4 nothin happens?

[editline]27th July 2011[/editline]

[lua]
function SWEP:PrimaryAttack()
print( "Current ANIM: " … self.AnimID)
self.AnimID=self.AnimID+self.inc
self:SendWeaponAnim( self:GetOwner():GetViewModel( ):LookupSequence( “ACT_AOC_SWING2” ))–self.AnimID )
print("FUCKYEAH: " … self:GetOwner():GetViewModel( ):LookupSequence( “ACT_AOC_SWING1” ))
end
[lua]

[editline]27th July 2011[/editline]

Starting to think the AOC weapons are unusable or something…

Anyone got any other ideas? i cant seem to find the anim numbers.

[editline]27th July 2011[/editline]

Ohhhh, that returns the sequence, now i need to figure out how to get an activity out of a sequence?

I told you how to do this on steam.



vm = self.Owner:GetViewModel( )
id = vm:LookupSequence( "desired_sequence" )
vm:ResetSequence( id )


Seems like when i attack too quickly it does the animation and everything serverside but not client side.
[lua]
function SWEP:ReturnToAnim(Old,New)
local vweap=self:GetOwner():GetViewModel( )
if(self.AttackID==Old)then
vweap:ResetSequence( New )
PrintMessage(HUD_PRINTCENTER ,“SEX”)
end
end
function SWEP:PrimaryAttack()
local vweap=self:GetOwner():GetViewModel( )
local id=0
local duration=0
if(math.random()<0.5)then
id,duration=vweap:LookupSequence( “swing1” )
else
id,duration=vweap:LookupSequence( “swing2” )
end
self:SetNextPrimaryFire(CurTime()+duration*0.75)
vweap:ResetSequence( id )
self.AttackID=self.AttackID+1
timer.Simple(duration, self.ReturnToAnim, self, self.AttackID, vweap:LookupSequence( “idle_01” ))
end
[/lua]

[editline]28th July 2011[/editline]

Didnt want to do this but you left me no choice garry!
[lua]
function SWEP:PrimaryAttack()
local vweap=self:GetOwner():GetViewModel( )
local id=0
local duration=0
if(math.random()<0.5)then
id,duration=vweap:LookupSequence( “swing1” )
else
id,duration=vweap:LookupSequence( “swing2” )
end
self:SetNextPrimaryFire(CurTime()+duration*0.75)
vweap:SetPlaybackRate( 1.0 )
vweap:ResetSequence( vweap:LookupSequence( “idle_01” ) )
timer.Simple(0.001, vweap.ResetSequence, vweap, id)
vweap:SetCycle( 0 )
self.AttackID=self.AttackID+1
timer.Simple(duration, self.ReturnToAnim, self, self.AttackID, vweap:LookupSequence( “idle_01” ))
end
[/lua]