stuff
This commit is contained in:
38
scripts/modules/npc_marker.gd
Normal file
38
scripts/modules/npc_marker.gd
Normal file
@@ -0,0 +1,38 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user