Files
academy2-game/scripts/modules/npc_marker.gd
Segey Lapin d6c8a24f5a stuff
2021-10-26 21:52:15 +03:00

39 lines
1.0 KiB
GDScript3

extends Node
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
var root = get_parent()
var cmdq = []
if root.has_meta("cmdqueue"):
cmdq = root.get_meta("cmdqueue")
cmdq.push_back(["register_marker", self, "head/marker_talk", {"method": "talk"}])
cmdq.push_back(["register_marker", self, "head/marker_hips_action", {"method": "action", "action": "hips_action"}])
cmdq.push_back(["show_marker", "head/marker_talk"])
cmdq.push_back(["show_marker", "head/marker_hips_action"])
root.set_meta("cmdqueue", cmdq)
func talk(data):
print("TALK")
# var root = get_parent()
# root.set_meta("req_state", "TALK")
# scenario.emit_signal("talk", root)
func marker_hips_action(data):
print("ACTION")
func action(data):
return
# var root = get_parent()
# root.set_meta("req_state", "ACTION")
# if root.is_in_group("nuns"):
# scenario.nun_action(root)
# else:
# if data.action == "hips_action":
# print(data)
# marker_hips_action(data)