Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | GrumpyIdiot |
Let me explain it better
So I’m trying to make the building disappears or transparent when the player goes behind it and when I use area2d, body enters and exits it works fine but when I start the game it makes the building invisible and when I enter and exit then it works fine
I know I should be using if
But I have no idea how.
So how do I make the building visible in the start of the game and invisible when the player enters.
I think it’s simple but I’m a beginner I don’t know much about gd script
Please give me an easy answer cuz my small brain doesn’t handle too much
Ohh btw it is a top down 2d game
What is making the buildings invisible when the game starts? I assume you’ve either 1) set their initial state to invisible (via the inspector) or 2) you have code that’s making them invisible on game start.
The easy answer is “don’t do that”. However, without knowing what is making them invisible on start, it’s hard to offer specific advice…
jgodfrey | 2023-02-06 23:31
That’s why I asked that
There is nothing making it invisible
But I used area 2d to send a signal when the player enters when they do the building should be invisible
And I know that’s why it is like that but how to fix it I have no clue
GrumpyIdiot | 2023-02-07 13:13