Hey guys, im trying to think of a way to create a “Super Smash Bros” damage system for gmod, i thought of a couple ways but could use some insight on the best way to do this, suggestions would be nice, Thanks!
Are you referring to the ‘get flung back the more damage you’ve taken’ system? If so, look back to this old Fretta gamemode called Knockback, which is essentially the same thing. It’s not 100% working for gmod13, but most of it works and I think it could help out if you give the init.lua a read.
- Set a player’s percent to 0 on spawn.
- When a player takes damage, calculate how much they should be knocked back based on their percentage and the force of the attack.
- Increase their percentage based on their percentage and the force of the attack.
For the actual knockback, I believe you can use player:SetLocalVelocity.
what file should i do this in?
A Lua file.
funny… which one
The one you create. And remember, you’ll have to write the code too.
oh ok thanks