Is it bad practice to use Level blueprint to cross talk with any objects in scene?

Is it bad practice to use Level blueprint to cross talk with any objects in scene? I am confused because some people say it is bad because good practice should be to objects communicating together and not a third party.

I don’t fully understand. Can you provide an example of what you mean by cross talk?

I use the Level Blueprint as the game or level manager that handles the enemy stats and player stats. That way , I don’t want a Level 40 enemy fighting a Level 1 player. For example, in programming game managers C# or C++, I use singleton classes that manages specific things in game scene. So the level manager can tell the enemy to not fight the player because he is not leveled up (unless the player attacks the enemy first).

Another example, is if a player enters a specific special door, the level manager will check player if he has certain items with him, so that manager can spawn certain enemies that respond to specific player items.

Basically I use this to cross talk to A.I and Player. Is this good practice? I get answers elsewhere that player and A.I should talk one on one and what I am doing is a bad practice.

I think the best way is interface

for example:

create an interface and name it “can say and hear hello?”

and then add it to any class that you want it to be able to say and hear “hello”

then every time that somebody says “hello” you must send an interface message(see that link)

then in any class that that interface is added to it , trigger interface event and implement how it must act against the message.

a dog barks. a human says hello. a monkey laughs :))))

Thank you! @saeedc

you do not need a level manager to do this.

use interfaces.

you have gate and some spawn points right?

create an interface name it player is in gate(for example) and add it to gate and spawn point.

then send an interface message and trigger an appropriate event for spawn points.

you might need to have other items be able to receive the message from gate. so using interfaces you do not need to do much work to improve your system

Thanks saeedc. I can use interfaces to keep track of stats as well?