feat: Keep current animations resource (#459)
Co-authored-by: Dennis Ploeger <develop@dieploegers.de>
This commit is contained in:
@@ -46,5 +46,22 @@ func validate(arguments: Array):
|
|||||||
func run(command_params: Array) -> int:
|
func run(command_params: Array) -> int:
|
||||||
(escoria.object_manager.get_object(command_params[0]).node as ESCPlayer)\
|
(escoria.object_manager.get_object(command_params[0]).node as ESCPlayer)\
|
||||||
.animations = load(command_params[1])
|
.animations = load(command_params[1])
|
||||||
|
if not escoria.globals_manager.has(
|
||||||
|
escoria.globals_manager.GLOBAL_ANIMATION_RESOURCES
|
||||||
|
):
|
||||||
|
escoria.globals_manager.set_global(
|
||||||
|
escoria.globals_manager.GLOBAL_ANIMATION_RESOURCES,
|
||||||
|
{},
|
||||||
|
true
|
||||||
|
)
|
||||||
|
var animations = escoria.globals_manager.get_global(
|
||||||
|
escoria.globals_manager.GLOBAL_ANIMATION_RESOURCES
|
||||||
|
)
|
||||||
|
animations[command_params[0]] = command_params[1]
|
||||||
|
escoria.globals_manager.set_global(
|
||||||
|
escoria.globals_manager.GLOBAL_ANIMATION_RESOURCES,
|
||||||
|
animations,
|
||||||
|
true
|
||||||
|
)
|
||||||
return ESCExecution.RC_OK
|
return ESCExecution.RC_OK
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ func validate(arguments: Array):
|
|||||||
|
|
||||||
# Run the command
|
# Run the command
|
||||||
func run(command_params: Array) -> int:
|
func run(command_params: Array) -> int:
|
||||||
escoria.object_manager.get_object(command_params[1]).node.set_state(
|
escoria.object_manager.get_object(command_params[0]).node.set_state(
|
||||||
"off"
|
"off"
|
||||||
)
|
)
|
||||||
return ESCExecution.RC_OK
|
return ESCExecution.RC_OK
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ extends Resource
|
|||||||
class_name ESCGlobalsManager
|
class_name ESCGlobalsManager
|
||||||
|
|
||||||
|
|
||||||
|
const GLOBAL_ANIMATION_RESOURCES = "ANIMATION_RESOURCES"
|
||||||
|
|
||||||
|
|
||||||
# Emitted when a global is changed
|
# Emitted when a global is changed
|
||||||
signal global_changed(global, old_value, new_value)
|
signal global_changed(global, old_value, new_value)
|
||||||
|
|
||||||
@@ -12,7 +15,8 @@ signal global_changed(global, old_value, new_value)
|
|||||||
# A list of reserved globals which can not be overridden
|
# A list of reserved globals which can not be overridden
|
||||||
const RESERVED_GLOBALS = [
|
const RESERVED_GLOBALS = [
|
||||||
"ESC_LAST_SCENE",
|
"ESC_LAST_SCENE",
|
||||||
"BYPASS_LAST_SCENE"
|
"BYPASS_LAST_SCENE",
|
||||||
|
"ANIMATION_RESOURCES"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@@ -104,6 +108,4 @@ func set_global_wildcard(pattern: String, value) -> void:
|
|||||||
func save_game(p_savegame: ESCSaveGame) -> void:
|
func save_game(p_savegame: ESCSaveGame) -> void:
|
||||||
p_savegame.globals = {}
|
p_savegame.globals = {}
|
||||||
for g in _globals:
|
for g in _globals:
|
||||||
if g in RESERVED_GLOBALS:
|
|
||||||
continue
|
|
||||||
p_savegame.globals[g] = _globals[g]
|
p_savegame.globals[g] = _globals[g]
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ export(String, FILE, "*.ogg,*.mp3,*.wav") var switch_sound = ""
|
|||||||
func _enter_tree():
|
func _enter_tree():
|
||||||
is_exit = true
|
is_exit = true
|
||||||
player_orients_on_arrival = false
|
player_orients_on_arrival = false
|
||||||
|
default_action = "walk"
|
||||||
|
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
|
|||||||
@@ -95,6 +95,18 @@ func _ready():
|
|||||||
),
|
),
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
|
if escoria.globals_manager.has(
|
||||||
|
escoria.globals_manager.GLOBAL_ANIMATION_RESOURCES
|
||||||
|
):
|
||||||
|
var animations = escoria.globals_manager.get_global(
|
||||||
|
escoria.globals_manager.GLOBAL_ANIMATION_RESOURCES
|
||||||
|
)
|
||||||
|
|
||||||
|
if player.global_id in animations and \
|
||||||
|
ResourceLoader.exists(animations[player.global_id]):
|
||||||
|
player.animations = ResourceLoader.load(
|
||||||
|
animations[player.global_id]
|
||||||
|
)
|
||||||
escoria.object_manager.get_object("_camera").node.set_target(player)
|
escoria.object_manager.get_object("_camera").node.set_target(player)
|
||||||
|
|
||||||
for n in get_children():
|
for n in get_children():
|
||||||
|
|||||||
@@ -184,9 +184,10 @@ func load_game(id: int):
|
|||||||
|
|
||||||
## GLOBALS
|
## GLOBALS
|
||||||
for k in save_game.globals.keys():
|
for k in save_game.globals.keys():
|
||||||
load_statements.append(
|
escoria.globals_manager.set_global(
|
||||||
ESCCommand.new("set_global %s \"%s\"\n" \
|
k,
|
||||||
% [k, save_game.globals[k]])
|
save_game.globals[k],
|
||||||
|
true
|
||||||
)
|
)
|
||||||
|
|
||||||
## ROOM
|
## ROOM
|
||||||
@@ -197,7 +198,8 @@ func load_game(id: int):
|
|||||||
|
|
||||||
## OBJECTS
|
## OBJECTS
|
||||||
for object_global_id in save_game.objects.keys():
|
for object_global_id in save_game.objects.keys():
|
||||||
if save_game.objects[object_global_id].has("active"):
|
if escoria.object_manager.has(object_global_id) and \
|
||||||
|
save_game.objects[object_global_id].has("active"):
|
||||||
load_statements.append(ESCCommand.new("set_active %s %s" \
|
load_statements.append(ESCCommand.new("set_active %s %s" \
|
||||||
% [object_global_id,
|
% [object_global_id,
|
||||||
save_game.objects[object_global_id]["active"]])
|
save_game.objects[object_global_id]["active"]])
|
||||||
@@ -230,12 +232,22 @@ func load_game(id: int):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if object_global_id in ["_music", "_sound", "_speech"]:
|
if object_global_id in ["_music", "_sound", "_speech"]:
|
||||||
load_statements.append(
|
if save_game.objects[object_global_id]["state"] in [
|
||||||
ESCCommand.new("play_snd %s %s" % [
|
"default",
|
||||||
save_game.objects[object_global_id]["state"],
|
"off"
|
||||||
object_global_id,
|
]:
|
||||||
])
|
load_statements.append(
|
||||||
)
|
ESCCommand.new("stop_snd %s" % [
|
||||||
|
object_global_id,
|
||||||
|
])
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
load_statements.append(
|
||||||
|
ESCCommand.new("play_snd %s %s" % [
|
||||||
|
save_game.objects[object_global_id]["state"],
|
||||||
|
object_global_id,
|
||||||
|
])
|
||||||
|
)
|
||||||
|
|
||||||
load_statements.append(
|
load_statements.append(
|
||||||
ESCCommand.new(
|
ESCCommand.new(
|
||||||
|
|||||||
@@ -9,145 +9,145 @@
|
|||||||
[ext_resource path="res://game/characters/mark/png/mark_talk_right.png" type="Texture" id=7]
|
[ext_resource path="res://game/characters/mark/png/mark_talk_right.png" type="Texture" id=7]
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=1]
|
[sub_resource type="AtlasTexture" id=1]
|
||||||
atlas = ExtResource( 4 )
|
atlas = ExtResource( 2 )
|
||||||
region = Rect2( 120, 0, 24, 70 )
|
region = Rect2( 0, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=2]
|
[sub_resource type="AtlasTexture" id=2]
|
||||||
atlas = ExtResource( 4 )
|
atlas = ExtResource( 2 )
|
||||||
region = Rect2( 216, 0, 24, 70 )
|
region = Rect2( 24, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=3]
|
[sub_resource type="AtlasTexture" id=3]
|
||||||
atlas = ExtResource( 4 )
|
atlas = ExtResource( 2 )
|
||||||
region = Rect2( 240, 0, 24, 70 )
|
region = Rect2( 48, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=4]
|
[sub_resource type="AtlasTexture" id=4]
|
||||||
atlas = ExtResource( 4 )
|
atlas = ExtResource( 4 )
|
||||||
region = Rect2( 264, 0, 24, 70 )
|
region = Rect2( 120, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=5]
|
[sub_resource type="AtlasTexture" id=5]
|
||||||
atlas = ExtResource( 4 )
|
atlas = ExtResource( 4 )
|
||||||
region = Rect2( 288, 0, 24, 70 )
|
region = Rect2( 72, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=6]
|
[sub_resource type="AtlasTexture" id=6]
|
||||||
atlas = ExtResource( 4 )
|
atlas = ExtResource( 7 )
|
||||||
region = Rect2( 312, 0, 24, 70 )
|
region = Rect2( 0, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=7]
|
[sub_resource type="AtlasTexture" id=7]
|
||||||
atlas = ExtResource( 4 )
|
atlas = ExtResource( 7 )
|
||||||
region = Rect2( 336, 0, 24, 70 )
|
region = Rect2( 24, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=8]
|
[sub_resource type="AtlasTexture" id=8]
|
||||||
atlas = ExtResource( 4 )
|
atlas = ExtResource( 7 )
|
||||||
region = Rect2( 360, 0, 24, 70 )
|
region = Rect2( 48, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=9]
|
[sub_resource type="AtlasTexture" id=9]
|
||||||
atlas = ExtResource( 4 )
|
atlas = ExtResource( 7 )
|
||||||
region = Rect2( 384, 0, 24, 70 )
|
region = Rect2( 72, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=10]
|
[sub_resource type="AtlasTexture" id=10]
|
||||||
atlas = ExtResource( 4 )
|
atlas = ExtResource( 7 )
|
||||||
region = Rect2( 0, 0, 24, 70 )
|
region = Rect2( 96, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=11]
|
[sub_resource type="AtlasTexture" id=11]
|
||||||
atlas = ExtResource( 4 )
|
atlas = ExtResource( 4 )
|
||||||
region = Rect2( 24, 0, 24, 70 )
|
region = Rect2( 24, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=12]
|
[sub_resource type="AtlasTexture" id=12]
|
||||||
atlas = ExtResource( 4 )
|
atlas = ExtResource( 6 )
|
||||||
region = Rect2( 144, 0, 24, 70 )
|
region = Rect2( 0, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=13]
|
[sub_resource type="AtlasTexture" id=13]
|
||||||
atlas = ExtResource( 4 )
|
atlas = ExtResource( 6 )
|
||||||
region = Rect2( 168, 0, 24, 70 )
|
region = Rect2( 24, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=14]
|
[sub_resource type="AtlasTexture" id=14]
|
||||||
atlas = ExtResource( 4 )
|
atlas = ExtResource( 4 )
|
||||||
region = Rect2( 192, 0, 24, 70 )
|
region = Rect2( 336, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=15]
|
[sub_resource type="AtlasTexture" id=15]
|
||||||
atlas = ExtResource( 4 )
|
atlas = ExtResource( 4 )
|
||||||
region = Rect2( 96, 0, 24, 70 )
|
region = Rect2( 360, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=16]
|
[sub_resource type="AtlasTexture" id=16]
|
||||||
atlas = ExtResource( 4 )
|
atlas = ExtResource( 4 )
|
||||||
region = Rect2( 48, 0, 24, 70 )
|
region = Rect2( 384, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=17]
|
[sub_resource type="AtlasTexture" id=17]
|
||||||
atlas = ExtResource( 2 )
|
atlas = ExtResource( 4 )
|
||||||
region = Rect2( 0, 0, 24, 70 )
|
region = Rect2( 96, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=18]
|
[sub_resource type="AtlasTexture" id=18]
|
||||||
atlas = ExtResource( 2 )
|
atlas = ExtResource( 4 )
|
||||||
region = Rect2( 24, 0, 24, 70 )
|
region = Rect2( 0, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=19]
|
[sub_resource type="AtlasTexture" id=19]
|
||||||
atlas = ExtResource( 2 )
|
atlas = ExtResource( 4 )
|
||||||
region = Rect2( 48, 0, 24, 70 )
|
region = Rect2( 144, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=20]
|
[sub_resource type="AtlasTexture" id=20]
|
||||||
atlas = ExtResource( 5 )
|
atlas = ExtResource( 4 )
|
||||||
region = Rect2( 0, 0, 24, 70 )
|
region = Rect2( 168, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=21]
|
[sub_resource type="AtlasTexture" id=21]
|
||||||
atlas = ExtResource( 5 )
|
atlas = ExtResource( 4 )
|
||||||
region = Rect2( 24, 0, 24, 70 )
|
region = Rect2( 192, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=22]
|
[sub_resource type="AtlasTexture" id=22]
|
||||||
atlas = ExtResource( 5 )
|
atlas = ExtResource( 4 )
|
||||||
region = Rect2( 48, 0, 24, 70 )
|
region = Rect2( 216, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=23]
|
[sub_resource type="AtlasTexture" id=23]
|
||||||
atlas = ExtResource( 6 )
|
atlas = ExtResource( 4 )
|
||||||
region = Rect2( 0, 0, 24, 70 )
|
region = Rect2( 240, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=24]
|
[sub_resource type="AtlasTexture" id=24]
|
||||||
atlas = ExtResource( 6 )
|
atlas = ExtResource( 4 )
|
||||||
region = Rect2( 24, 0, 24, 70 )
|
region = Rect2( 264, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=25]
|
[sub_resource type="AtlasTexture" id=25]
|
||||||
atlas = ExtResource( 4 )
|
atlas = ExtResource( 4 )
|
||||||
region = Rect2( 72, 0, 24, 70 )
|
region = Rect2( 288, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=26]
|
[sub_resource type="AtlasTexture" id=26]
|
||||||
atlas = ExtResource( 7 )
|
atlas = ExtResource( 4 )
|
||||||
region = Rect2( 0, 0, 24, 70 )
|
region = Rect2( 312, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=27]
|
[sub_resource type="AtlasTexture" id=27]
|
||||||
atlas = ExtResource( 7 )
|
atlas = ExtResource( 4 )
|
||||||
region = Rect2( 24, 0, 24, 70 )
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=28]
|
|
||||||
atlas = ExtResource( 7 )
|
|
||||||
region = Rect2( 48, 0, 24, 70 )
|
region = Rect2( 48, 0, 24, 70 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=28]
|
||||||
|
atlas = ExtResource( 5 )
|
||||||
|
region = Rect2( 0, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=29]
|
[sub_resource type="AtlasTexture" id=29]
|
||||||
atlas = ExtResource( 7 )
|
atlas = ExtResource( 5 )
|
||||||
region = Rect2( 72, 0, 24, 70 )
|
region = Rect2( 24, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=30]
|
[sub_resource type="AtlasTexture" id=30]
|
||||||
atlas = ExtResource( 7 )
|
atlas = ExtResource( 5 )
|
||||||
region = Rect2( 96, 0, 24, 70 )
|
region = Rect2( 48, 0, 24, 70 )
|
||||||
|
|
||||||
[sub_resource type="SpriteFrames" id=31]
|
[sub_resource type="SpriteFrames" id=31]
|
||||||
animations = [ {
|
animations = [ {
|
||||||
"frames": [ SubResource( 1 ) ],
|
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 2 ), SubResource( 3 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "speak_down",
|
||||||
|
"speed": 6.0
|
||||||
|
}, {
|
||||||
|
"frames": [ SubResource( 4 ) ],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": "idle_down_left",
|
"name": "idle_down_left",
|
||||||
"speed": 5.0
|
"speed": 5.0
|
||||||
}, {
|
}, {
|
||||||
"frames": [ SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ) ],
|
"frames": [ SubResource( 5 ) ],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": "walk_right",
|
"name": "idle_up",
|
||||||
"speed": 6.0
|
"speed": 5.0
|
||||||
}, {
|
}, {
|
||||||
"frames": [ SubResource( 7 ), SubResource( 8 ), SubResource( 9 ), SubResource( 8 ) ],
|
"frames": [ SubResource( 6 ), SubResource( 7 ), SubResource( 8 ), SubResource( 9 ), SubResource( 10 ) ],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": "walk_up",
|
"name": "speak_right",
|
||||||
"speed": 6.0
|
|
||||||
}, {
|
|
||||||
"frames": [ SubResource( 10 ) ],
|
|
||||||
"loop": true,
|
|
||||||
"name": "idle_down",
|
|
||||||
"speed": 5.0
|
"speed": 5.0
|
||||||
}, {
|
}, {
|
||||||
"frames": [ SubResource( 11 ) ],
|
"frames": [ SubResource( 11 ) ],
|
||||||
@@ -155,45 +155,45 @@ animations = [ {
|
|||||||
"name": "idle_down_right",
|
"name": "idle_down_right",
|
||||||
"speed": 5.0
|
"speed": 5.0
|
||||||
}, {
|
}, {
|
||||||
"frames": [ SubResource( 12 ), SubResource( 13 ), SubResource( 14 ), SubResource( 13 ) ],
|
"frames": [ SubResource( 12 ), SubResource( 13 ), SubResource( 12 ), SubResource( 13 ), SubResource( 13 ) ],
|
||||||
"loop": true,
|
|
||||||
"name": "walk_down",
|
|
||||||
"speed": 6.0
|
|
||||||
}, {
|
|
||||||
"frames": [ SubResource( 15 ) ],
|
|
||||||
"loop": true,
|
|
||||||
"name": "idle_left",
|
|
||||||
"speed": 5.0
|
|
||||||
}, {
|
|
||||||
"frames": [ SubResource( 16 ) ],
|
|
||||||
"loop": true,
|
|
||||||
"name": "idle_right",
|
|
||||||
"speed": 5.0
|
|
||||||
}, {
|
|
||||||
"frames": [ SubResource( 17 ), SubResource( 18 ), SubResource( 19 ), SubResource( 18 ), SubResource( 19 ) ],
|
|
||||||
"loop": true,
|
|
||||||
"name": "speak_down",
|
|
||||||
"speed": 6.0
|
|
||||||
}, {
|
|
||||||
"frames": [ SubResource( 20 ), SubResource( 21 ), SubResource( 22 ) ],
|
|
||||||
"loop": true,
|
|
||||||
"name": "speak_down_right",
|
|
||||||
"speed": 6.0
|
|
||||||
}, {
|
|
||||||
"frames": [ SubResource( 23 ), SubResource( 24 ), SubResource( 23 ), SubResource( 24 ), SubResource( 24 ) ],
|
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": "speak_up",
|
"name": "speak_up",
|
||||||
"speed": 3.0
|
"speed": 3.0
|
||||||
}, {
|
}, {
|
||||||
"frames": [ SubResource( 25 ) ],
|
"frames": [ SubResource( 14 ), SubResource( 15 ), SubResource( 16 ), SubResource( 15 ) ],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": "idle_up",
|
"name": "walk_up",
|
||||||
|
"speed": 6.0
|
||||||
|
}, {
|
||||||
|
"frames": [ SubResource( 17 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "idle_left",
|
||||||
"speed": 5.0
|
"speed": 5.0
|
||||||
}, {
|
}, {
|
||||||
"frames": [ SubResource( 26 ), SubResource( 27 ), SubResource( 28 ), SubResource( 29 ), SubResource( 30 ) ],
|
"frames": [ SubResource( 18 ) ],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": "speak_right",
|
"name": "idle_down",
|
||||||
"speed": 5.0
|
"speed": 5.0
|
||||||
|
}, {
|
||||||
|
"frames": [ SubResource( 19 ), SubResource( 20 ), SubResource( 21 ), SubResource( 20 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "walk_down",
|
||||||
|
"speed": 6.0
|
||||||
|
}, {
|
||||||
|
"frames": [ SubResource( 22 ), SubResource( 23 ), SubResource( 24 ), SubResource( 25 ), SubResource( 26 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "walk_right",
|
||||||
|
"speed": 6.0
|
||||||
|
}, {
|
||||||
|
"frames": [ SubResource( 27 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "idle_right",
|
||||||
|
"speed": 5.0
|
||||||
|
}, {
|
||||||
|
"frames": [ SubResource( 28 ), SubResource( 29 ), SubResource( 30 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "speak_down_right",
|
||||||
|
"speed": 6.0
|
||||||
} ]
|
} ]
|
||||||
|
|
||||||
[sub_resource type="CapsuleShape2D" id=32]
|
[sub_resource type="CapsuleShape2D" id=32]
|
||||||
|
|||||||
172
game/characters/mark/mark_animations_weird.tres
Normal file
172
game/characters/mark/mark_animations_weird.tres
Normal file
@@ -0,0 +1,172 @@
|
|||||||
|
[gd_resource type="Resource" load_steps=36 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://addons/escoria-core/game/core-scripts/resources/esc_animationresource.gd" type="Script" id=1]
|
||||||
|
[ext_resource path="res://addons/escoria-core/game/core-scripts/resources/esc_directionangle.gd" type="Script" id=2]
|
||||||
|
[ext_resource path="res://addons/escoria-core/game/core-scripts/resources/esc_animationname.gd" type="Script" id=3]
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=1]
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
angle_start = 340
|
||||||
|
angle_size = 40
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=2]
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
angle_start = 20
|
||||||
|
angle_size = 50
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=3]
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
angle_start = 70
|
||||||
|
angle_size = 40
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=4]
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
angle_start = 110
|
||||||
|
angle_size = 50
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=5]
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
angle_start = 160
|
||||||
|
angle_size = 40
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=6]
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
angle_start = 200
|
||||||
|
angle_size = 50
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=7]
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
angle_start = 250
|
||||||
|
angle_size = 40
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=8]
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
angle_start = 290
|
||||||
|
angle_size = 50
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=9]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "walk_down"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=10]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "walk_up"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=11]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "walk_left"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=12]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "walk_up"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=13]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "walk_right"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=14]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "walk_left"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=15]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "walk_up"
|
||||||
|
mirrored = true
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=16]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "walk_down"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=17]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "idle_up"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=18]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "idle_up"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=19]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "idle_right"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=20]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "idle_down_right"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=21]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "idle_down"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=22]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "idle_down_left"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=23]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "idle_left"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=24]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "idle_up"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=25]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "speak_up"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=26]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "speak_up"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=27]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "speak_right"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=28]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "speak_down"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=29]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "speak_down"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=30]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "speak_down"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=31]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "speak_right"
|
||||||
|
mirrored = true
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=32]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "speak_up"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource( 1 )
|
||||||
|
dir_angles = [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ) ]
|
||||||
|
directions = [ SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ), SubResource( 13 ), SubResource( 14 ), SubResource( 15 ), SubResource( 16 ) ]
|
||||||
|
idles = [ SubResource( 17 ), SubResource( 18 ), SubResource( 19 ), SubResource( 20 ), SubResource( 21 ), SubResource( 22 ), SubResource( 23 ), SubResource( 24 ) ]
|
||||||
|
speaks = [ SubResource( 25 ), SubResource( 26 ), SubResource( 27 ), SubResource( 28 ), SubResource( 29 ), SubResource( 30 ), SubResource( 31 ), SubResource( 32 ) ]
|
||||||
@@ -56,7 +56,7 @@ global_id = "r14_l_exit"
|
|||||||
esc_script = "res://game/rooms/room14/esc/left_exit.esc"
|
esc_script = "res://game/rooms/room14/esc/left_exit.esc"
|
||||||
is_exit = true
|
is_exit = true
|
||||||
tooltip_name = "Left exit"
|
tooltip_name = "Left exit"
|
||||||
default_action = "use"
|
default_action = "walk"
|
||||||
dialog_color = Color( 1, 1, 1, 1 )
|
dialog_color = Color( 1, 1, 1, 1 )
|
||||||
animations = null
|
animations = null
|
||||||
|
|
||||||
@@ -71,7 +71,6 @@ global_id = "r12_l_exit"
|
|||||||
[node name="r_door" parent="Hotspots" instance=ExtResource( 8 )]
|
[node name="r_door" parent="Hotspots" instance=ExtResource( 8 )]
|
||||||
global_id = "r14_r_exit"
|
global_id = "r14_r_exit"
|
||||||
esc_script = "res://game/rooms/room14/esc/right_exit.esc"
|
esc_script = "res://game/rooms/room14/esc/right_exit.esc"
|
||||||
default_action = "use"
|
|
||||||
|
|
||||||
[node name="ESCLocation" type="Position2D" parent="Hotspots/r_door"]
|
[node name="ESCLocation" type="Position2D" parent="Hotspots/r_door"]
|
||||||
position = Vector2( 1231.78, 360.624 )
|
position = Vector2( 1231.78, 360.624 )
|
||||||
|
|||||||
3
game/rooms/room15/esc/switch_animation.esc
Normal file
3
game/rooms/room15/esc/switch_animation.esc
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
:use
|
||||||
|
|
||||||
|
set_animations player res://game/characters/mark/mark_animations_weird.tres
|
||||||
@@ -68,7 +68,7 @@ global_id = "r15_l_exit"
|
|||||||
esc_script = "res://game/rooms/room15/esc/left_exit.esc"
|
esc_script = "res://game/rooms/room15/esc/left_exit.esc"
|
||||||
is_exit = true
|
is_exit = true
|
||||||
tooltip_name = "Left exit"
|
tooltip_name = "Left exit"
|
||||||
default_action = "use"
|
default_action = "walk"
|
||||||
dialog_color = Color( 1, 1, 1, 1 )
|
dialog_color = Color( 1, 1, 1, 1 )
|
||||||
animations = null
|
animations = null
|
||||||
|
|
||||||
@@ -83,7 +83,6 @@ global_id = "r12_l_exit"
|
|||||||
[node name="r_door" parent="Hotspots" instance=ExtResource( 8 )]
|
[node name="r_door" parent="Hotspots" instance=ExtResource( 8 )]
|
||||||
global_id = "r15_r_exit"
|
global_id = "r15_r_exit"
|
||||||
esc_script = ""
|
esc_script = ""
|
||||||
default_action = "use"
|
|
||||||
|
|
||||||
[node name="ESCLocation" type="Position2D" parent="Hotspots/r_door"]
|
[node name="ESCLocation" type="Position2D" parent="Hotspots/r_door"]
|
||||||
position = Vector2( 1231.78, 360.624 )
|
position = Vector2( 1231.78, 360.624 )
|
||||||
@@ -105,6 +104,15 @@ tooltip_name = "Say long test right"
|
|||||||
[node name="Position2D" type="Position2D" parent="Hotspots/say_long"]
|
[node name="Position2D" type="Position2D" parent="Hotspots/say_long"]
|
||||||
position = Vector2( 362.457, 358.656 )
|
position = Vector2( 362.457, 358.656 )
|
||||||
|
|
||||||
|
[node name="switch_animation" parent="Hotspots" instance=ExtResource( 9 )]
|
||||||
|
position = Vector2( 510.195, 3.80031 )
|
||||||
|
global_id = "switch_animation"
|
||||||
|
esc_script = "res://game/rooms/room15/esc/switch_animation.esc"
|
||||||
|
tooltip_name = "Switch animation"
|
||||||
|
|
||||||
|
[node name="Position2D" type="Position2D" parent="Hotspots/switch_animation"]
|
||||||
|
position = Vector2( 362.457, 358.656 )
|
||||||
|
|
||||||
[node name="say_long_left" parent="Hotspots" instance=ExtResource( 9 )]
|
[node name="say_long_left" parent="Hotspots" instance=ExtResource( 9 )]
|
||||||
position = Vector2( -205.218, 2.85024 )
|
position = Vector2( -205.218, 2.85024 )
|
||||||
global_id = "say_long_left"
|
global_id = "say_long_left"
|
||||||
|
|||||||
@@ -6,16 +6,13 @@
|
|||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
escoria_version = "0.1.0"
|
escoria_version = "0.1.0"
|
||||||
game_version = "0.1.0"
|
game_version = "0.1.0"
|
||||||
name = "Testtt1"
|
name = "testwalk"
|
||||||
date = "04/11/2021 22:13"
|
date = "23/11/2021 19:51"
|
||||||
main = {
|
main = {
|
||||||
"current_scene_filename": "res://game/rooms/room01/room01.tscn",
|
"current_scene_filename": "res://game/rooms/room15/room15.tscn",
|
||||||
"last_scene_global_id": ""
|
"last_scene_global_id": ""
|
||||||
}
|
}
|
||||||
globals = {
|
globals = {
|
||||||
"dialog_advance": 0,
|
|
||||||
"dialog_popup_advance": 0,
|
|
||||||
"room1_visited": true
|
|
||||||
}
|
}
|
||||||
objects = {
|
objects = {
|
||||||
"_camera": {
|
"_camera": {
|
||||||
@@ -26,7 +23,7 @@ objects = {
|
|||||||
"_music": {
|
"_music": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"interactive": true,
|
"interactive": true,
|
||||||
"state": "res://game/sfx/contemplation.ogg"
|
"state": "default"
|
||||||
},
|
},
|
||||||
"_sound": {
|
"_sound": {
|
||||||
"active": true,
|
"active": true,
|
||||||
@@ -40,53 +37,43 @@ objects = {
|
|||||||
},
|
},
|
||||||
"player": {
|
"player": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"global_transform": Transform2D( 1, 0, 0, 1, 399, 480 ),
|
"global_transform": Transform2D( 1, 0, 0, 1, 243.677, 455.569 ),
|
||||||
"interactive": true,
|
"interactive": true,
|
||||||
"last_deg": 71,
|
"last_deg": 1,
|
||||||
"last_dir": 2,
|
"last_dir": 0,
|
||||||
"state": "default"
|
"state": "default"
|
||||||
},
|
},
|
||||||
"player_start": {
|
"r12_l_exit": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"interactive": true,
|
"interactive": true,
|
||||||
"state": "default"
|
"state": "default"
|
||||||
},
|
},
|
||||||
"r1_destination_point": {
|
"r15_l_exit": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"interactive": true,
|
"interactive": true,
|
||||||
"state": "default"
|
"state": "default"
|
||||||
},
|
},
|
||||||
"r1_destination_point2": {
|
"r15_r_exit": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"interactive": true,
|
"interactive": true,
|
||||||
"state": "default"
|
"state": "default"
|
||||||
},
|
},
|
||||||
"r1_destination_point3": {
|
"say_long": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"interactive": true,
|
"interactive": true,
|
||||||
"state": "default"
|
"state": "default"
|
||||||
},
|
},
|
||||||
"r1_r_exit": {
|
"say_long_left": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"interactive": true,
|
"interactive": true,
|
||||||
"state": "default"
|
"state": "default"
|
||||||
},
|
},
|
||||||
"r1_start": {
|
"start": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"interactive": true,
|
"interactive": true,
|
||||||
"state": "default"
|
"state": "default"
|
||||||
},
|
},
|
||||||
"r1_wall_item1": {
|
"switch_animation": {
|
||||||
"active": true,
|
|
||||||
"interactive": true,
|
|
||||||
"state": "default"
|
|
||||||
},
|
|
||||||
"r1_wall_item2": {
|
|
||||||
"active": true,
|
|
||||||
"interactive": true,
|
|
||||||
"state": "default"
|
|
||||||
},
|
|
||||||
"trigger_talk": {
|
|
||||||
"active": true,
|
"active": true,
|
||||||
"interactive": true,
|
"interactive": true,
|
||||||
"state": "default"
|
"state": "default"
|
||||||
|
|||||||
@@ -6,16 +6,20 @@
|
|||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
escoria_version = "0.1.0"
|
escoria_version = "0.1.0"
|
||||||
game_version = "0.1.0"
|
game_version = "0.1.0"
|
||||||
name = "Test2"
|
name = "testwalk2"
|
||||||
date = "04/11/2021 22:59"
|
date = "23/11/2021 20:19"
|
||||||
main = {
|
main = {
|
||||||
"current_scene_filename": "res://game/rooms/room02/room02.tscn",
|
"current_scene_filename": "res://game/rooms/room15/room15.tscn",
|
||||||
"last_scene_global_id": ""
|
"last_scene_global_id": ""
|
||||||
}
|
}
|
||||||
globals = {
|
globals = {
|
||||||
|
"ANIMATION_RESOURCES": {
|
||||||
|
"player": "res://game/characters/mark/mark_animations_weird.tres"
|
||||||
|
},
|
||||||
|
"BYPASS_LAST_SCENE": false,
|
||||||
|
"ESC_LAST_SCENE": "room1",
|
||||||
"dialog_advance": 0,
|
"dialog_advance": 0,
|
||||||
"dialog_popup_advance": 0,
|
"dialog_popup_advance": 0,
|
||||||
"r2_bridge_closed": true,
|
|
||||||
"room1_visited": true
|
"room1_visited": true
|
||||||
}
|
}
|
||||||
objects = {
|
objects = {
|
||||||
@@ -27,12 +31,12 @@ objects = {
|
|||||||
"_music": {
|
"_music": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"interactive": true,
|
"interactive": true,
|
||||||
"state": "res://game/sfx/contemplation.ogg"
|
"state": "off"
|
||||||
},
|
},
|
||||||
"_sound": {
|
"_sound": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"interactive": true,
|
"interactive": true,
|
||||||
"state": "default"
|
"state": "off"
|
||||||
},
|
},
|
||||||
"_speech": {
|
"_speech": {
|
||||||
"active": true,
|
"active": true,
|
||||||
@@ -41,50 +45,45 @@ objects = {
|
|||||||
},
|
},
|
||||||
"player": {
|
"player": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"global_transform": Transform2D( 1, 0, 0, 1, 1051, 434 ),
|
"global_transform": Transform2D( 1, 0, 0, 1, 606, 441 ),
|
||||||
"interactive": true,
|
"interactive": true,
|
||||||
"last_deg": 111,
|
"last_deg": 251,
|
||||||
"last_dir": 3,
|
"last_dir": 6,
|
||||||
"state": "default"
|
"state": "default"
|
||||||
},
|
},
|
||||||
"player_start": {
|
"r12_l_exit": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"interactive": true,
|
"interactive": true,
|
||||||
"state": "default"
|
"state": "default"
|
||||||
},
|
},
|
||||||
"r2_bridge": {
|
"r15_l_exit": {
|
||||||
"active": true,
|
|
||||||
"interactive": false,
|
|
||||||
"state": "bridge_close"
|
|
||||||
},
|
|
||||||
"r2_button": {
|
|
||||||
"active": true,
|
"active": true,
|
||||||
"interactive": true,
|
"interactive": true,
|
||||||
"state": "default"
|
"state": "default"
|
||||||
},
|
},
|
||||||
"r2_button_right": {
|
"r15_r_exit": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"interactive": true,
|
"interactive": true,
|
||||||
"state": "default"
|
"state": "default"
|
||||||
},
|
},
|
||||||
"r2_l_exit": {
|
"say_long": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"interactive": true,
|
"interactive": true,
|
||||||
"state": "default"
|
"state": "default"
|
||||||
},
|
},
|
||||||
"r2_player_start": {
|
"say_long_left": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"interactive": true,
|
"interactive": true,
|
||||||
"state": "default"
|
"state": "default"
|
||||||
},
|
},
|
||||||
"r2_r_exit": {
|
"start": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"interactive": true,
|
"interactive": true,
|
||||||
"state": "default"
|
"state": "default"
|
||||||
},
|
},
|
||||||
"r2_right_platform": {
|
"switch_animation": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"interactive": false,
|
"interactive": true,
|
||||||
"state": "default"
|
"state": "default"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user