Download

Event Tick Only fires off once

I have a hand mesh set to disappear when I pick up a gun and reappear when I release the gun.
ec85148b844da4574bfd5494e17f392860339f91.jpeg
f3267af30fd8724a1ba0def8f228836fdc4ba98d.jpeg
73b0e33beafdaa2167cc2be9dfcb444bdb0a9bcb.jpeg
dfb17ba9b14c3a0b5b6113c7bf5f3271c74c2324.jpeg

and it seems to work fine. When I pick up the mesh the hand disappears, when I release it the hand comes back. However the problem is when I try to pick up the mesh again the hand doesn’t disappear.
679907f70e4754fe8b0e613e3593d5e812b59785.jpeg

I thought because its a tick it should be able to tell when I have picked up the gun a second time that it could tell that and make the hand invisible again or is it that I’m just missing some really simple thing?

When you pickup the item the bool is valid (for the hand to be visible) ?

Maybe use just 1 bool and a flipflop node or set the other bool behind the visibility node. Depends how you set your bool, and where, not shown above. Also tick can be disabled, and the tick value can be modified. But if it works i guess it is enabled. The setting to enable tick is in the blueprint settings panel, when you click the up most blueprint root node…

The important part, where you set your boolean variables, misses. I guess you’re not setting both variables at any point. In general, why do you have 2 variables for this? I’m pretty sure one is enough. And that would prevent such kind of bugs. If the weapon is equipped, you set WeaponEquipped to true. If it’s not, you set it to false. No point for WeaponUnEquipped variable. In addition, why do you have this code in EventTick? Why not setting the visibility directly at the point you’re setting your WeaponEquipped variable?

I did try setting it to false first but for some reason it wouldn’t work but your second suggestion go straight to the source works like a dream. Your right I don’t know why I was making it over complicated for myself.