hello guys, greetings
I need help regarding adding a trait to another (empty) when my (player) first collides with a certain object and when he stops being in contact with said object, the trait of the (empty) is stopped/removed to avoid these objects don’t spawn constantly and slow down the game
basically it is, if my character is in a “room” for example, the void will generate obstacles and when my character leaves from the “room”, the void will stop generating them.
the problem that I have in my file is that when my (character) collides with “the room” the game stops but does not close, it is as if all the features stopped working.
I’m definitely doing things wrong but I don’t know what, thank you very much in advance.
pos: I tried to add the feature to the beginning of the (empty) so that it generates the obstacles and stop it in case my (character) collided with another object that I chose but it did not work
Edit: in the file you can see that the (empty) ones I want to add the trait to are children of the objects that will add the trait when my (character) collides with one of them,is what I want to do, when my character is in contact with the floor, the empty has the trait and when leaving the floor, the empty loses the trait