Detect/Enable on weapon fired/released?

Users who are viewing this thread

Hi,

I'm relatively new to Bannerlord modding and C#, I've dabbled in modding C++, Java etc over the years in other games but not very used to this system so forgive me if this question comes over as a bit stupid.

In basic principle I need to write up a mod that:

Detects when:

A. The player has a projectile weapon e.g. bow and arrow, crossbow or even a javelin.
B. Detects when they actually fire/release said weapon.

Once they fire:

A. Tracks the projectile path and follows closely with a camera
B. Deletes the camera/closes the view back to the player once the projectile makes contact on any surface/target.

I've dug around with dnSpy etc trying to see if I could spot where the game defines a player firing etc but no luck, I'm hoping someoen can point me in the right direction.

Planning to make this into a projectile camera mod to learn a bit myself and then release and make open source in the hopes some other people can learn from it.

Thanks :smile:
 
Back
Top Bottom