to make show and hide

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By rodell2020

my layout
platform2a (a Node 2D)
player (Kinmatic2d [with a sprite and collisionshape2d]
button (which is named button) [with a sprite]
platform2b ​[solid Tile map] and platform2c [Solid Tile map] [with a script ]

func _physics_process(delta):
to hide platform2c

what i am trying to do is
when the player walks into the button
platform2c is now set to [so it can been seen and walked across]

:bust_in_silhouette: Reply From: Gluon

Put a collision shape on the sprite for the button. Set up a signal from the collision shape for the button so that when the player enters it sends a signal and then add into the script for the for the platform a function from the signal to change the show/hide function on the platform.

There is a step by step guide in the documentation here

and although this guide is for a timer its the same process for a collision shape 2d.