How to get a reference of the weapon, in all the bullets ?

Hello, guys,

So, I’ve got a weapon that got a bool variables “HookIsHooked”.
When this weapon launches a hook, I’d like to get a reference of this weapon in my hook blueprint, so when my hook does something, like hitting a wall. I’d need to make “HookIsHooked” from FALSE to TRUE.

So, how do i get a reference of the weapon in my projectile ?


Thanks again

in bullet create variable of weapon type and set it up like “instance editable” and “expose on spawn” in detail panel. Next when you create bullet in spawn node you can see this variable on spawn. set up it on self (your weapon) (if you not see this variable on spawn → right mouse click on spawn node and → refresh node)

1 Like

Thanks alot! Working as intended.

While waiting for a solution I did the opposite, I gave the bullet reference to the gun, and did the work in gun BP instead of bullet BP.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.