This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

OK (I am using 3.4.4 on windows 11)
Now I have my Level as follows

Level-A
platform-A
platform-B --the platform I love to make disappear/reappear ---
Button [an Aear2d Sprite, collisionShape2d] about half on platform-A
exit [an Aear2d, Sprite, CollisionShape2D] at the end of platform-B
player
camera(a child of player)

I have tried placing the script file on platform-B
func physicsprocess(delta):
visible = false
it works the platform disappears

now when i tried to make the player walk the button
I connect the button signal to the script platform-B
then tried visible = true but it does not work.
I can use print("hello") and it prints hello in the output window

Godot version 3.4.4
in Engine by (52 points)

1 Answer

0 votes

That is because you are using a procces() function to set it invisible. Procces happens every frame (60 times per second by default). So even though your signal sets the platform visible, just in a fraction of a second, it is set to invisble again.

A quick fix would be to use _ready()to set the platform invisible, since this only triggers once when the node enters the scene.

I suggest you read the documentation

by (450 points)

Thank you Thank you a big big big big THANK YOU,
IT WORKS JUST incase anyone wants to know you can do more than 1 platform on a level
I now have 3 (all 3 working form the same signal)

glad it helped! remember to select the awnser as best awnser so that it shows as awnsered

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.