Can 2 Reload Animations Be Used?

In a dod sweps pack im making, some of the v_models have multiple reload animations like the c96 mauser, the colt 45 and the tokarev with colt 45 animins. am i able to use both relaod animations , one while the pistol has some ammo and one when the pistol has no ammo.

here is the lua script

/---------------------------------------------------------
Reload
---------------------------------------------------------
/
function SWEP:Reload()

if ( self.Reloadaftershoot > CurTime() ) then return end
– If you’re firering, you can’t reload

self.Weapon:DefaultReload(ACT_VM_RELOAD_EMPTY)
– Animation when you’re reloading

if ( self.Weapon:Clip1() < self.Primary.ClipSize ) and self.Owner:GetAmmoCount(self.Primary.Ammo) > 0 then
– When the current clip < full clip and the rest of your ammo > 0, then

self.Owner:SetFOV( 0, 0.15 )
– Zoom = 0

self:SetIronsights(false)
– Set the ironsight to false
end
end

the two animin’s are (ACT_VM_RELOAD_EMPTY) and (ACT_VM_RELOAD)
so would i be able to use one when the pistol is empty and one is full

your help would be nice
i will post a video if you wish to demonstrate my problem.

also, the dod american machine gun has incorrect reolad animations where when R is pressed, the gun relaods to full ammo count immideately without going through a relaod animation.
Ive tried to modify the lua to fix this and i went back to the original lua when that didnt work, but the problem still exsisted, it might be the model thouh, can someone help me out on either of these 2

I didnt have replies in the other thread because i probably posted in the wrong one

Seriously guys i need some help with this i wanna know how to make 2 realod animations work so when the clip is empty it will have a different animation like in insurgency and some dod weapons

I guess ill help you out.

I already made a 1911 swep that has this shit.

Ill trim away the code & get it to you when im around my home computer.

As for the 30Cal reload animation problem, I already have a fourm about it :3

http://www.facepunch.com/showthread.php?t=752108

Ok Thanks for the help… remember to send me the file

A snippet from one of the SWEPs I made:

[lua]
if self.Silenced then
self:SendWeaponAnim( self.Animations.Silenced.Reload.Anim )
else
self:SendWeaponAnim( self.Animations.Normal.Reload.Anim )
end
[/lua]

[lua]
SWEP.Animations = {
Normal = {
Attach = { Anim = ACT_VM_ATTACH_SILENCER , Length = 93 / 30 },
Draw = { Anim = ACT_VM_DRAW , Length = 33 / 30 },
DryFire = { Anim = ACT_VM_DRYFIRE , Length = 33 / 25 },
Fire = { Anim = ACT_VM_PRIMARYATTACK , Length = 33 / 25 * .4 },
Reload = { Anim = ACT_VM_RELOAD , Length = 83 / 30 },
},
Silenced = {
Detach = { Anim = ACT_VM_DETACH_SILENCER , Length = 93 / 30 },
Draw = { Anim = ACT_VM_DRAW_SILENCED , Length = 33 / 30 },
DryFire = { Anim = ACT_VM_DRYFIRE_SILENCED , Length = 33 / 30 },
Fire = { Anim = ACT_VM_PRIMARYATTACK_SILENCED , Length = 33 / 25 * .4 },
Reload = { Anim = ACT_VM_RELOAD_SILENCED , Length = 83 / 30 },
}
}
[/lua]

Where the animation’s activity is the .Anim property.

You don’t need to define the table setup I have going there ( it isn’t needed at all ), it just makes my life easier in other functions.

but that dosent include ACT_VM_RELOAD AND ACT_VM_RELOAD_EMPTY that is just animins for silencers…

or am i just stupid and dont see it?

It’s example code, not the solution code. It’s as simple as changing it from the silenced / unsilenced version to empty / not empty stuff.

ok, sorry, now i understand

nothing i seem to do is working, anyone else have any ideas

and…

where did you upload the 1911 swep

Now that I’m finaly back at my home PC, I have trimmed away the code to a simpler form.

Gentelmen…



/*---------------------------------------------------------
Reload
---------------------------------------------------------*/
function SWEP:Reload()

	if ( self.Reloadaftershoot > CurTime() ) then return end 

	if ( self.Weapon:Clip1() < self.Primary.ClipSize ) and self.Owner:GetAmmoCount(self.Primary.Ammo) > 0 then
		self.Owner:SetFOV( 0, 0.15 )
		self:SetIronsights(false)
		if ( self.Weapon:Clip1() <= 0 ) then
			self.Weapon:DefaultReload(ACT_VM_RELOAD_EMPTY)
		else
			self.Weapon:DefaultReload(ACT_VM_RELOAD)
		end
	end
end


I keep your stuff in there for you.

WOW!!!

I cant thank you enough for your help

now i can the reloads both to work

Looks like your statement is indeed not correct. Now that I look back on you all, I find it funny how I even got involved with you all Facepunch dickheads.

I have over 20 more alt accounts blended in better than a communist in 1960’s New York so cut off one head, and two more shall take its place.

Baldur out :smiley: