OnActorEndOverlap gives a different result if EvenBeginPlay is also triggered? [SOLVED]

Hello ClarkKhant!

Yes… You are missing cast to player character, it is really important, it states that when an actor overlap is not enough.
That actor must be the player!

And also, in which graph are those nodes?
The target you are using in the toggle visibility makes me think…

It seems to work as intended, but it is not, that’s why you’re troubling whit this event begin play.

Event begin play is simply fired when an object start to be in the world, when the game begin play or when an object is spawned, only this.

Like ninjin said you probably put those nodes in level BP. But the key is that you are enabling/disabling inputs for an actor. Not in generic.

The actor is the point light.

The input is still enabled for the rest of the world, here comes your problem.

Try focus on understanding what each step do.
Every single node is really important, in some instances you’ll end in absolutely different results by changing a single point.

Remember that you are talking to a machine and for a machine one thing can be only black or white… Not grey.
Is you the one who have to lower itself.

No problem, it was just 2 lines… Lol

It seems to work as intended, but it is not, that’s why you’re troubling whit this event begin play.

Event begin play is simply fired when an object start to be in the world, when the game begin play or when an object is spawned, only this.

The key is that you are enabling/disabling your player inputs for an actor. Not in generic.

The actor is the point light.

The input is still enabled for the rest of the world, here comes your problem.

Try focus on understanding what each step do.
Every single node is really important, in some instances you’ll end in absolutely different results by changing a single point. Remember that you are talking to a machine.

I stumbled upon this by accident.

The following logic in picture attached allows the player to turn on light by pressing F in side Trigger volume. But the input will be disabled once the player is outside.

However I found it weird that if you remove “Event BegingPlay”, the entire logic doesn’t work and Input can be given from anywhere. This is in contrast to what is described in Unreal 4 Documentation: https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/ActorInput/Blueprints/

Is it a bug? Or am I missing something?

What do you mean which graph?

No, you don’t even need to do casting or create a Blueprint class like in video tutorial from Official Unreal youtube channel. The graph works as intended even without doing these thing. That’s the point. BUT if Event Beginplay is removed, the light can be turned on/off from anywhere. But why?

What is so significant about Event BeginPlay?

But the Controller won’t fire if I Event BeginPlay is used like I did in the picture. Why does it happen? Can you go into a bit more details ( I am still confused)?

Ofcourse you need BeginPlay to disable the Input. OnActorEndOverlap won’t fire if you start the game. Is that want you want to know? Also, even if it is still working, you should give Enable/ Disable Input your Player Controller as reference, even though the only reason I can give for now is that you are confusing other people.

*AZTECCO, I didn’t see you replied to my comment that I wanted to delete, so I accidently removed your comment, please forgive me! <3

Ah…you deleted my comment.

Yes, I am using level blueprint. Yes!!! why doesn’t OnActorEndOverLap fire without including Even BeginPlay?

It does fire, but not on start of the game, that’s what BeginPlay is for. Your character never entered the trigger, so it won’t fire OnActorEndOverlap automatically.

Thanks to you both!

Thanks to you both!