Extracting behaviour extracting only type [SOLVED BY BRADENS AND JR01]

I am making a feature of hiding in a closet in my game, but there’s a problem:
The player hides, (camera goes to the closet and the character is destroyed) and when they show up the camera does not focus on him because of the extractors Y and X only extracting a specific character’s object with a name, not the entire type

use globals extracting the players position instead of just extractors

1 Like

Oh, thank you for being so fast!
But, how do i this? Can you give me a image? No need for text, just the image is absolutely enough
Thanks again

1 Like

put that in the player then have the camera object always getting the value of the globals

Okay, i will try
And gosh, you’re fast! Thank you!

1 Like

Hey, so
This idea unfortunately didn’t work when i putted it in
What i do?

are you sure you’re putting it in both the player and extracting with the camera, did you not select the right globals? if you send the link to the game i can troubleshoot for you

I am gonna send the link
I selected the right globals and they are linked with the camera’s block position that is linked with the camera

1 Like

Here’s the link
The game is in Portuguese, (i updated the name in English) so there will be some Brazilian references

which object is the camera object?

The completely white
I named it interact middle way because it was it’s first objective, but i realized it was unusual, so i transformed it as a camera and forgot to rename

1 Like

you’re inputting Diego Y into the x value.

1 Like

wait
really? God, i was really dumb!

1 Like

Okay, i fixed it
But it didn’t work. What am i doing wrong?

you might not need all that giant mess of code.
can’t you just keep this,
image
and then destroy/spawn the camera as needed?

Ok, i will try, thank you a lot. But before i do this: i want the camera after the player object is destroyed to focus on the closet and when the player object is summoned the camera focus on it
I am not understanding how this will help, can you help me?

do the same thing you did with the player, extract the closet’s coordinates the player went into with globals, and make the camera go to the closet instead with a router or toggle switch.

Ok
Thank you, now i opened my mind

1 Like

So
It didn’t worked
(I added some switches otherwise the numbers would crash)
What i did wrong?