Weapon fire event (using Bolt)

CraigHubbard

New member
I'm trying to set up a stimulus on weapon fire. I only have two weapons that will both have the same stimulus profile, so I don't need to know which weapon fired, only that one of them did so that I can do an overlap check for nearby enemies. And one of the weapons is a bow, so I need a fire event, not an item use event, as I already discovered the latter triggers when the bow is drawn rather than released.

I read the appropriate support material, but the problem is that I'm using Bolt since I'm not a coder, and I haven't had any success in trying to translate the recommendations for subscribing to the event system to get an item ability use activation, etc.

Any advice on how best to proceed? Thanks!
 
I'm not familiar with the Bolt visual scripting system, but if I'm understanding correctly you need an event that gets called whenever one of these ShootableWeapons actually gets fired?

One option is to use an animation event, which you could add to your firing animations at the moment of fire, and I'm assuming Bolt has some way of listening for animation events on the character which you could use.

There is also an "OnAnimatorItemUseComplete" event which is self-explanatory (e.g. it only gets called on the bow when you actually release the arrow). This gets registered in the EventHandler within Use.cs.
 
It worked!

As a heads up, the first person bow release animation doesn't seem to be used. Took me a while to notice because I was so sure I was doing something wrong that I was looking for problems elsewhere, but finally it occurred to me to monitor the animator and I saw the issue right away.

Thanks again!
 
Top