New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request : Knockback #2394
Comments
Sounds fun, TNT could knockback players too depending on their distance. |
Yes. Maybe a |
You have my vote! |
agree, but need a protocol bump to implement to action |
Knockback is a great idea, it would greatly enhance gameplay. The idea as such needs to be more clearly specified. First, it is unclear how knockback strength should be specified. Punches should vary from no knockback over weak knockback to strong knockbacks, but where do you specify it? One possibility is to give items/tools/weapons a base knockback strength, so if you punch an object with this item, this knockback strength is applied to the object. Also, knockback should also apply for entities. Also, I would suggest that knockback resistance is not specified on a yes/no basis but on a scalar basis. Every object should have a non-negative knockback factor, so the actual knockback is * . This is usual to make targets either more prone to knockbacks or more resistant, or even immune to knockbacks (knockback factor 0). The default knockback factor should be 1. Lastly, all functions in the Lua API dealing with punches etc. should be extended with a knockback parameter. I.e. if you want to punch something with Lua, you can set the knockback strength of the punch. nerzhul: Then its good that 0.5.0 is in the making, compability is allowed to be broken. :=) |
In mobs redo they use hitters tool capabilities as a multiplier to determine the strength of the knockback. I thought that was pretty clever. |
@Wuzzy2 Basically, yes. I want that. Like I said, there should be a setting whether knockback applies to certain objects, like how there is a setting that gives objects HP. |
For some (not all) situations this could possibly be done in lua by setting player's velocity. The TNT mod could give players a little kick even when far away to simulate a shockwave: knockback being exponential with distance. |
@paramat It could be done by just adding code, but I wanted to make it available for modders without having old mods have no knockback, and making swords have extra code. |
Yes certainly i approve. I might try editing the lua TNT mod for a shockwave kick. |
It doesn't have that feature because it isn't currently possible. You can't set player velocity or acceleration. |
Here is the issue for missing |
Issue #1176 shows that players do not actually have velocity. |
The parachute mod is worth looking at with regards to this. An object can be attached to the player and it's velocity and acceleration set, I think. The player stays attached to the object. |
As for swords, perhaps add a way to hit players/entities with the flat of your sword, so that you knock them back further. |
I would like to see this too! |
Would it be worthwhile to rewrite |
Sure.
What about TNT cannons that can throw the player or objects?
…On Mon, Mar 13, 2017 at 10:02 AM C1ffisme ***@***.***> wrote:
Would it be worthwhile to rewrite Object:punch() to apply knockback based
on where the hitter is?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2394 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACslgOtMKtblLIXF7xumDe5jGafr-GKks5rlWixgaJpZM4DmnXl>
.
|
I guess this feature can't be dismissed anymore now that we have CSM. |
The player is still not a modifyable entity/object in CSM |
I mean that nobody can say "Let's wait for client side scripting before implementing this" |
https://github.com/tenplus1/playerplus has knockback introduced by @tenplus1 |
Is this still being worked on or at least in a todo list? |
Currently, there is no form of knockback. If you hit something/someone, he/she/it just get damaged, but not pushed back. Now, I could implement this and put it in the code for swords, but what would be the point? You would have to tell all the modders to code their weapons to be like the default swords.
Now, if we want a weapon or object that dosen't use knockback (e.g,
__builtin:item
) then we add a group to it likeknockback = false
. That way modders can chose to use knockback or not depending on what they are making. Also, I would optionally like an option calledknockback_distance
that tells how far you would fire the hit object.If we add this, it might lead to more interesting mods. I can already see a soccer mod where you have to hit the ball with your hand and use knockback to push it along.
Now, suppose some griefers use knockback for griefing, by pushing people into lava, well, we can add a config option to disable knockback, in minetest.conf. Maybe something like
do_knockback = true
?Anyway, I want to see what the community thinks of adding this.
The text was updated successfully, but these errors were encountered: