how to make 2D hidden trap in godot in 3.2 version help please

help me to make 2d hidden trap in godot send me all thing need to make hidden trap in game godot plese

Hidden trap? ok so add a area2d, a sprite as the trap texture and setup a collision.The area2d will be the hidden trap. Set the modulate of the sprite to transfarent. So in area 2d codes, connect the on area2d body entered signal and add codes what you want to do with player like:

func _on_area_2d_body_entered(body):
  if body is Player:
    body.take_damage(20)
    #You can create the animation of the transfarent sprite to visible

(You need to add class_name Player after extends KinematicBody2D)

2 Likes