.:`=-~rANdOm~`-=:. Game Servers

Technology (Read Only) => Programming => Topic started by: Shawny </3 on March 18, 2012, 09:17:23 PM

Title: LUA: Zombine SWEP Problem D:
Post by: Shawny </3 on March 18, 2012, 09:17:23 PM
Ok so I made a zombine swep for mine and Kurtis's Zombie Survival server and it works nearly 100%. But it sometimes doesn't use the attack animation.

I increased and decreased the delay and animations are correct. This doesn't happen very often but it can be irritating D:


The attack animation code is proper.

   if self.SwapAnims then
      self:SendWeaponAnim(ACT_VM_HITCENTER)
   else
      self:SendWeaponAnim(ACT_VM_PRIMARYATTACK)
   end
   self.SwapAnims = not self.SwapAnims



I would put the entire coding in here but It wont fit :C

So if anyone can give me an idea I will give you gummy bears :3




It works 100% fine except for this 1 problem...


Thanks in advanced...
Title: Re: LUA: Zombine SWEP Problem D:
Post by: coolzeldad on March 18, 2012, 10:01:58 PM
Could you provide more information on the circumstances when this problem happens?

Also are you testing on a local server? Does the animation not play only on clients not on the local server... only to specific pings, etc.
Title: Re: LUA: Zombine SWEP Problem D:
Post by: Shawny </3 on March 18, 2012, 10:37:56 PM
Could you provide more information on the circumstances when this problem happens?

Also are you testing on a local server? Does the animation not play only on clients not on the local server... only to specific pings, etc.


Wow a reply from the man himself o.O



Ok when you hold your left mouse button and your zombie arms keep attacking, sometimes it doesn't play the attack animation.
I am testing it on our web hosted server.



*MOAR Detail*
When your attacking with the zombie arms swep your arms always swing continuously. with the zombine swep that i made sometimes(1/4 chance) the animation doesnt play.
Do i need to add a delay?


*EDIT*
My ping on the server is around 100.

On the RND Zombie Survival(when it was up) I usually had a ping of 150 - 200 and my arms worked perfectly.

Also im not sure if it's lag but it seems when the arms hit the actual hit happens 1/4 of a second after the arms hit the wall. That may be just lag though.
Title: Re: LUA: Zombine SWEP Problem D:
Post by: Mehis on March 28, 2012, 09:38:28 AM
I think there is nothing wrong with the code. If the animations work in a local server, it just means that the animations of the model are too long, short or even compiled wrong, which just happens in most of the games when high latency.
I get no animations from ZS sometimes when I hold attack too.

Oh god I didn't see the post date...
Title: Re: LUA: Zombine SWEP Problem D:
Post by: Shawny </3 on April 05, 2012, 11:14:50 AM
I think there is nothing wrong with the code. If the animations work in a local server, it just means that the animations of the model are too long, short or even compiled wrong, which just happens in most of the games when high latency.
I get no animations from ZS sometimes when I hold attack too.

Oh god I didn't see the post date...

Oh ok thank you. But one question, if i add a delay to it would it help a bit?
Title: Re: LUA: Zombine SWEP Problem D:
Post by: Tomcat on April 06, 2012, 08:48:02 AM
It would be nicer if you could give us the whole hook you're currently running in (assuming its primary attack)
Title: Re: LUA: Zombine SWEP Problem D:
Post by: Shawny </3 on April 07, 2012, 12:55:36 AM
It would be nicer if you could give us the whole hook you're currently running in (assuming its primary attack)

The attack animation is ACT_VM_SECONDARRYATTACK


ACT_VM_PRIMARRYATTACK is the anim for reaching for a grenade.

But i got it fixed now.