Closed raymoo closed 5 years ago
Nevermind, looking at the newly-added documentation, this should be possible.
Actually, I think I understand what you mean now, maybe I should have an on_shoot
callback that permits to pass such metadata? There may well be other possibilities for this than just knock-back, however, it may have to wait as I'd really like to get a release made soon.
I don't remember my original intention, I may have just wanted some custom item that fires by calling fire_weapon with a dynamically-chosen metadata, which seems possible with the changes you made.
Okay, I guess it can be closed in that case.
custom item that fires by calling fire_weapon with a dynamically-chosen metadata
I would also like that the api could make it possible to attach 'guns' to objects, such as a plane or even mobs/AI. It can just about be done already using a 'fake' player reference but I'd prefer something a bit less hacky :)
Opening a new issue as suggested in #16, since I can't tell if my original idea is possible with the change.
The idea was that you have a metadata value on the bullet that gets set at firing time, so could be different every time (decided by the mod). I think in the current form, my example from that issue (https://github.com/stujones11/shooter/issues/16#issuecomment-228435533) couldn't be implemented, since the spec table passed to the callback is fixed for a particular definition, except for some extra data added by shooter itself.