Closed raymoo closed 5 years ago
I am not sure I understand this one, can you give an example use-case?
You could make a gun that pushes people in the direction of your choice. One way to select the direction could be to press a direction key while firing. You could store the direction in the metadata and then move the target when they get hit.
You could make a gun that pushes people in the direction of your choice.
There have been other issues for "adding" velocity to the player, as opposed to setting absolute velocity (minetest/minetest#2394). I never even gave an implementation though, you could fit the description I gave by attaching the target to an entity and moving the entity in the desired direction (and probably removing it at some point). Though a pushing API would be nice.
With ccf1b02b525116604af7380c3d0395726f2f26f5 it is possible to also include arbitrary gun spec
values which will be included the spec
table passed to on_hit
along with the direction in which the bullet was travelling in. The latter should be useful for knock-back effects, etc.
Please open a new issue if this is not what you meant.
Only really useful with #15. This would give firing another parameter which gets passed to the hit callback if the shot hits.