Variable increment on Overlap event

Hi,

I’m new to UE and I am trying to figure out some basics. I’m trying to create ‘checkpoint’ gates using BP. Whenever gate collides (ActorBeginOverlap event) with a player I want it to play a sound, increment my int variable by +1 and destroy the gate. Now I managed to do that but for some reason variable gets updated only twice. Third gate doesn’t update it even though tha sound is played and the gate is destroyed. Any suggestions?

You should be counting in the character blueprint, not in the gate since gates get destroyed. If each gate has a variable, its value will not be accessible once the owning actor is gone.

It’s hard to tell where (character or gate BP) the above happens.

Could you clarify?

Ok that will probably be the problem. I thought the variable exists even though all instances of the BP are destroyed:) I will try your solution soon