Velocity of arrows decreases too much
#1
Hello

I want to rise the frequency with that one shoots arrows with a bow (imagine a machine gun). But if I spawn arrows manually they don't behave like "normal" arrows because the velocity decreases much more. Also, how can I get the arrow-shooting animation of the arrow?

I have to following code in the HOOK_PLAYER_RIGHT_CLICK:
Code:
Pos = Player:GetThrowStartPos()
Speed = Player:GetThrowSpeed(30)
Arrow = World:CreateProjectile(Pos.x, Pos.y, Pos.z, cProjectileEntity.pkArrow, Player, nil, Speed)
return true


I am trying to solve this for hours, so thanks in advance Smile
Reply
Thanks given by:
#2
There are known issues with velocity and knock-back. Someone will hopefully fix them eventually.
Reply
Thanks given by:
#3
Hello,
there shouldn't be any difference between spawning an arrow in a plugin and by the server.
Note that the server uses a speed coeff (for cPlayer:GetThrowSpeed() ) in the range of 6 (min bow force) to 60 (max bow force), so you might want to try with different speed coeffs.

I suppose you meant the arrow-shooting animation of the bow, there's currently no way to do that. Not sure if it is even supported in the protocol, I'd expect this to be completely client-side.
Reply
Thanks given by:




Users browsing this thread: 4 Guest(s)