Spidermangun too fast

So i added the spidey gun but when i use it it goes waaaaaaaaaaaaaaaaay to fast, idk how to fix it… heres my code

Did you see this

[LUA]self.speed = 10000[/LUA]

yes, i lowered it and it didnt do anything :frowning:

well i lowered it to 5000, maybe i should try lower

[editline]3rd December 2013[/editline]

didnt work

Did you try setting it higher?

self.speed = 10000
self.startTime = CurTime()
self.endTime = CurTime() + self.speed

Assuming that endTime is the cooldown between two shots, it looks like setting it higher will make the user have to wait longer to shoot the swep again.

-Posts whole code of a swep he downloaded from somewhere

Why does that always crack me up

Please use [lua] [./lua] tags in future,

Also Rainbow, it’s not that they can shoot it again quickly, it’s just that it flies way to fast, what gamemode is this for?

 SWEP.Base = "weapon_tttbase"

Of course it’s too fast (projectile wise). Because there is no actual motion on the beam, it is just being created.

It’s not too hard to add something like this yourself, just look into newton’s equations of motion. Now of course you could go the extra mile and add in a dynamic rope, but if you want it to be physically valid you would need to look into the crazy maths.

There are two ways of doing this:
-An actual entity being projected and it sticking to what ever it collides with. Simple forces.
-Using a prediction system when you aim are something, use a Type of Bezier curve with Typical h values on the parabola of the motion of the web.

The second one will be more appealing and easier to use. if you want I can do some maths for you for an illusion of dynamic rope (using a 4th dimensional Bezier curve so the arc will become smooth and the rope become taught) and just your everyday motion equations?