Godot Version
4.2.1
Question
trying to put letters inside the map, that when player finds them, they will pop up and show what is written inside them and by clicking any key they will go away, kinda like Resident Evil series or Silent hill series. I am using RichTextLabel for the text of the letters, so keep that in mind. also this is the code for the letters, that when player gets them they will disapear:
var codex1=false
func _on_body_entered(body):
if body.name=="player":
codex1=true
queue_free()
not something special but you know XD.
UPDATE:
well I combined it with pause basics … here is the code:
extends Area2D
@onready var Showcodex=$"../CodexMenue"
var codex1=false
func _on_body_entered(body):
if body.name=="player":
queue_free()
cod()
func cod():
if codex1:
print("hola")
Showcodex.hide()
Engine.time_scale=1
else:
print("bye")
Showcodex.show()
Engine.time_scale=0
codex1 = !codex1