:setup action is not managed only once anymore (#358)
Co-authored-by: StraToN <StraToN@users.noreply.github.com>
This commit is contained in:
@@ -9,10 +9,6 @@ extends ESCBaseCommand
|
|||||||
class_name ChangeSceneCommand
|
class_name ChangeSceneCommand
|
||||||
|
|
||||||
|
|
||||||
# An array of scenes that have already been loaded
|
|
||||||
var readied_scenes: Array = []
|
|
||||||
|
|
||||||
|
|
||||||
# Return the descriptor of the arguments of this command
|
# Return the descriptor of the arguments of this command
|
||||||
func configure() -> ESCCommandArgumentDescriptor:
|
func configure() -> ESCCommandArgumentDescriptor:
|
||||||
return ESCCommandArgumentDescriptor.new(
|
return ESCCommandArgumentDescriptor.new(
|
||||||
@@ -103,10 +99,8 @@ func run(command_params: Array) -> int:
|
|||||||
|
|
||||||
escoria.main.scene_transition.fade_in()
|
escoria.main.scene_transition.fade_in()
|
||||||
yield(escoria.main.scene_transition, "transition_done")
|
yield(escoria.main.scene_transition, "transition_done")
|
||||||
|
|
||||||
# If scene was never visited, add "ready" event to the events stack
|
if script.events.has("ready"):
|
||||||
if not command_params[0] in self.readied_scenes \
|
|
||||||
and script.events.has("ready"):
|
|
||||||
escoria.event_manager.queue_event(script.events["ready"])
|
escoria.event_manager.queue_event(script.events["ready"])
|
||||||
var rc = yield(escoria.event_manager, "event_finished")
|
var rc = yield(escoria.event_manager, "event_finished")
|
||||||
while rc[1] != "ready":
|
while rc[1] != "ready":
|
||||||
@@ -114,8 +108,6 @@ func run(command_params: Array) -> int:
|
|||||||
if rc[0] != ESCExecution.RC_OK:
|
if rc[0] != ESCExecution.RC_OK:
|
||||||
return rc[0]
|
return rc[0]
|
||||||
|
|
||||||
self.readied_scenes.append(command_params[0])
|
|
||||||
|
|
||||||
# Clear queued resources
|
# Clear queued resources
|
||||||
escoria.resource_cache.clear()
|
escoria.resource_cache.clear()
|
||||||
|
|
||||||
|
|||||||
@@ -329,14 +329,14 @@ func set_angle(deg: int, immediate = true):
|
|||||||
func start_talking():
|
func start_talking():
|
||||||
if animation_sprite.is_playing():
|
if animation_sprite.is_playing():
|
||||||
animation_sprite.stop()
|
animation_sprite.stop()
|
||||||
animation_sprite.play(animations.speaks[_movable.last_dir][0])
|
animation_sprite.play(animations.speaks[_movable.last_dir].animation)
|
||||||
|
|
||||||
|
|
||||||
# Stop playing the talking animation
|
# Stop playing the talking animation
|
||||||
func stop_talking():
|
func stop_talking():
|
||||||
if animation_sprite.is_playing():
|
if animation_sprite.is_playing():
|
||||||
animation_sprite.stop()
|
animation_sprite.stop()
|
||||||
animation_sprite.play(animations.idles[_movable.last_dir][0])
|
animation_sprite.play(animations.idles[_movable.last_dir].animation)
|
||||||
|
|
||||||
|
|
||||||
# Detect the child nodes and set respective references
|
# Detect the child nodes and set respective references
|
||||||
|
|||||||
@@ -315,7 +315,7 @@ func _ev_left_click_on_item(obj, event, default_action = false):
|
|||||||
"arrived"
|
"arrived"
|
||||||
)
|
)
|
||||||
|
|
||||||
self.logger.info("Context arrived: %s" % var2str(context))
|
self.logger.info("Context arrived: %s" % context)
|
||||||
|
|
||||||
if context.target_object and \
|
if context.target_object and \
|
||||||
context.target_object.global_id != walk_context.\
|
context.target_object.global_id != walk_context.\
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ func _on_mouse_double_left_click_inventory_item(
|
|||||||
# that is hovered
|
# that is hovered
|
||||||
func _on_mouse_entered_inventory_item(inventory_item_global_id: String) -> void:
|
func _on_mouse_entered_inventory_item(inventory_item_global_id: String) -> void:
|
||||||
escoria.logger.info(
|
escoria.logger.info(
|
||||||
"Inventory item focused " % inventory_item_global_id
|
"Inventory item focused %s" % inventory_item_global_id
|
||||||
)
|
)
|
||||||
escoria.main.current_scene.game.inventory_item_focused(
|
escoria.main.current_scene.game.inventory_item_focused(
|
||||||
inventory_item_global_id
|
inventory_item_global_id
|
||||||
|
|||||||
@@ -14,16 +14,6 @@ to benefit save games, so they don't conflict with the scene's events.
|
|||||||
|
|
||||||
@ESC
|
@ESC
|
||||||
|
|
||||||
## Property Descriptions
|
|
||||||
|
|
||||||
### readied\_scenes
|
|
||||||
|
|
||||||
```gdscript
|
|
||||||
var readied_scenes: Array
|
|
||||||
```
|
|
||||||
|
|
||||||
An array of scenes that have already been loaded
|
|
||||||
|
|
||||||
## Method Descriptions
|
## Method Descriptions
|
||||||
|
|
||||||
### configure
|
### configure
|
||||||
|
|||||||
@@ -47,12 +47,12 @@ All ESC scripts are divided into a series of events, which in turn run commands
|
|||||||
|
|
||||||
An event has a name and the prefix ":" like this:
|
An event has a name and the prefix ":" like this:
|
||||||
|
|
||||||
`:setup`
|
`:ready`
|
||||||
|
|
||||||
While you can use arbitrary event names (for example to schedule them with the `sched_event`command), there are some special events that are called by Escoria when certaiin things happen:
|
While you can use arbitrary event names (for example to schedule them with the `sched_event`command), there are some special events that are called by Escoria when certain things happen:
|
||||||
|
|
||||||
* `:setup` (on an ESCScene object): Called everytime when the scene is loaded
|
* `:setup` (on an ESCScene object): Called before the transition is performed.
|
||||||
* `:ready`(on an ESCScene object): Called only when the scene is loaded the first time
|
* `:ready`(on an ESCScene object): Called after the transition is performed.
|
||||||
* `:use <global id>`(on an ESCItem object): Called when the inventory item `<global id>`was used with this item
|
* `:use <global id>`(on an ESCItem object): Called when the inventory item `<global id>`was used with this item
|
||||||
* `:<verb>`(on an ESCItem object): Called when a special verb was used on the item (e.g. `:look`)
|
* `:<verb>`(on an ESCItem object): Called when a special verb was used on the item (e.g. `:look`)
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
[gd_scene load_steps=6 format=2]
|
[gd_scene load_steps=7 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_item.gd" type="Script" id=1]
|
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_item.gd" type="Script" id=1]
|
||||||
|
[ext_resource path="res://game/characters/worker/worker_animations.tres" type="Resource" id=2]
|
||||||
[ext_resource path="res://game/characters/worker/png/worker.png" type="Texture" id=4]
|
[ext_resource path="res://game/characters/worker/png/worker.png" type="Texture" id=4]
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=1]
|
[sub_resource type="AtlasTexture" id=1]
|
||||||
@@ -26,7 +27,7 @@ is_movable = true
|
|||||||
tooltip_name = "Worker"
|
tooltip_name = "Worker"
|
||||||
default_action = "look"
|
default_action = "look"
|
||||||
dialog_color = Color( 0.196078, 0, 1, 1 )
|
dialog_color = Color( 0.196078, 0, 1, 1 )
|
||||||
animations = null
|
animations = ExtResource( 2 )
|
||||||
|
|
||||||
[node name="sprite" type="AnimatedSprite" parent="."]
|
[node name="sprite" type="AnimatedSprite" parent="."]
|
||||||
position = Vector2( 0.0280151, -16.7213 )
|
position = Vector2( 0.0280151, -16.7213 )
|
||||||
|
|||||||
172
game/characters/worker/worker_animations.tres
Normal file
172
game/characters/worker/worker_animations.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_up"
|
||||||
|
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_right"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=12]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "walk_down"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=13]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "walk_down"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=14]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "walk_down"
|
||||||
|
mirrored = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=15]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "walk_right"
|
||||||
|
mirrored = true
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id=16]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
animation = "walk_up"
|
||||||
|
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 ) ]
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
#const dir_angles = [
|
|
||||||
# 0, # 0 NORTH FACE CAMERA
|
|
||||||
# 45, # 1 NORTHEAST
|
|
||||||
# 90, # 2 EAST
|
|
||||||
# 135, # 3 SOUTHEAST
|
|
||||||
# 180, # 4 SOUTH BACK TO CAMERA
|
|
||||||
# 225, # 5 SOUTHWEST
|
|
||||||
# 270, # 6 WEST
|
|
||||||
# 315, # 7 NORTHWEST
|
|
||||||
#]
|
|
||||||
|
|
||||||
# Angle is [from_angle, area_angle]
|
|
||||||
# example: on a clock, [180, 45] starts exactly from 6 o'clock (180°)
|
|
||||||
# and stops between 7 o'clock and 8 o'clock (45° from 6 o'clock)
|
|
||||||
const dir_angles = [
|
|
||||||
[340, 40], # 0 UP
|
|
||||||
[20, 50], # 1 RIGHT UP
|
|
||||||
[70, 40], # 2 RIGHT
|
|
||||||
[110, 50], # 3 RIGHT DOWN
|
|
||||||
[160, 40], # 4 DOWN
|
|
||||||
[200, 50], # 5 LEFT DOWN
|
|
||||||
[250, 40], # 6 LEFT
|
|
||||||
[290, 50] # 7 LEFT UP
|
|
||||||
]
|
|
||||||
|
|
||||||
# Array of animations for each direction, from UP to RIGHT_UP clockwise
|
|
||||||
# [animation_name, scale]: scale parameter can be set to -1 to mirror the animation
|
|
||||||
const directions = [
|
|
||||||
["walk_up", 1], # 0 UP
|
|
||||||
["walk_up", 1], # 1 RIGHT UP
|
|
||||||
["walk_right", 1], # 2 RIGHT
|
|
||||||
["walk_down", 1], # 3 RIGHT DOWN
|
|
||||||
["walk_down", 1], # 4 DOWN
|
|
||||||
["walk_down", 1], # 5 LEFT DOWN
|
|
||||||
["walk_right", -1], # 6 LEFT
|
|
||||||
["walk_up", 1] # 7 LEFT UP
|
|
||||||
]
|
|
||||||
|
|
||||||
const idles = [
|
|
||||||
["idle_up", 1], # 0 UP
|
|
||||||
["idle_up", 1], # 1 RIGHT UP
|
|
||||||
["idle_right", 1], # 2 RIGHT
|
|
||||||
["idle_down_right", 1], # 3 RIGHT DOWN
|
|
||||||
["idle_down", 1], # 4 DOWN
|
|
||||||
["idle_down_left", 1], # 5 LEFT DOWN
|
|
||||||
["idle_left", 1], # 6 LEFT
|
|
||||||
["idle_up", 1] # 7 LEFT UP
|
|
||||||
]
|
|
||||||
|
|
||||||
const speaks = [
|
|
||||||
["speak_up", 1], # 0 UP
|
|
||||||
["speak_up", 1], # 1 RIGHT UP
|
|
||||||
["speak_right", 1], # 2 RIGHT
|
|
||||||
["speak_down", 1], # 3 RIGHT DOWN
|
|
||||||
["speak_down", 1], # 4 DOWN
|
|
||||||
["speak_down", 1], # 5 LEFT DOWN
|
|
||||||
["speak_right", -1], # 6 LEFT
|
|
||||||
["speak_up", 1] # 7 LEFT UP
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
#const directions = ["walk_left", -1, # 0
|
|
||||||
# "walk_left", -1, # 1
|
|
||||||
# "walk_back", 1, # 2
|
|
||||||
# "walk_back", 1, # 3
|
|
||||||
# "walk_left", 1, # 4
|
|
||||||
# "walk_left", 1, # 5
|
|
||||||
# "walk_front", 1, # 6
|
|
||||||
# "walk_front", 1 # 7
|
|
||||||
# ]
|
|
||||||
#
|
|
||||||
#const idles = [ "idle_front_right", 1, # 0
|
|
||||||
# "idle_front_right", 1, # 1
|
|
||||||
# "idle_back", 1, # 2
|
|
||||||
# "idle_back", 1, # 3
|
|
||||||
# "idle_front_left", 1, # 4
|
|
||||||
# "idle_front_left", 1, # 5
|
|
||||||
# "idle_front", 1, # 6
|
|
||||||
# "idle_front", 1 # 7
|
|
||||||
# ]
|
|
||||||
#
|
|
||||||
#const speaks = ["idle_front_left", 1, # 0
|
|
||||||
# "idle_front_left", 1, # 1
|
|
||||||
# "idle_back", 1, # 2
|
|
||||||
# "idle_back", 1, # 3
|
|
||||||
# "idle_front_right", 1, # 4
|
|
||||||
# "idle_front_right", 1, # 5
|
|
||||||
# "idle_front", 1, # 6
|
|
||||||
# "idle_front", 1 # 7
|
|
||||||
# ]
|
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
:setup
|
:setup
|
||||||
set_global dialog_advance 0
|
|
||||||
set_global dialog_popup_advance 0
|
|
||||||
> [eq ESC_LAST_SCENE room2]
|
> [eq ESC_LAST_SCENE room2]
|
||||||
teleport player r1_r_exit
|
teleport player r1_r_exit
|
||||||
# Set player look left
|
# Set player look left
|
||||||
@@ -10,11 +8,19 @@
|
|||||||
teleport player player_start
|
teleport player player_start
|
||||||
stop
|
stop
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:ready
|
:ready
|
||||||
set_sound_state bg_music res://game/sfx/contemplation.ogg true
|
set_sound_state bg_music res://game/sfx/contemplation.ogg true
|
||||||
|
|
||||||
walk player r1_destination_point
|
> [!room1_visited]
|
||||||
wait 2
|
set_global room1_visited true
|
||||||
walk player r1_destination_point2
|
set_global dialog_advance 0
|
||||||
wait 2
|
set_global dialog_popup_advance 0
|
||||||
set_angle player 225 false
|
walk player r1_destination_point
|
||||||
|
wait 2
|
||||||
|
walk player r1_destination_point2
|
||||||
|
wait 2
|
||||||
|
set_angle player 225 false
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
# THIS ROOMS FEATURES AN OPEN BRIDGE WITH A BUTTON TO USE IN ORDER TO OPEN
|
# THIS ROOMS FEATURES AN OPEN BRIDGE WITH A BUTTON TO USE IN ORDER TO OPEN
|
||||||
|
|
||||||
|
|
||||||
:setup
|
:setup
|
||||||
|
|
||||||
> [r2_bridge_closed]
|
> [r2_bridge_closed]
|
||||||
@@ -25,15 +24,14 @@
|
|||||||
#set_global r2_bridge_closed true
|
#set_global r2_bridge_closed true
|
||||||
set_interactive r2_right_platform false
|
set_interactive r2_right_platform false
|
||||||
#set_interactive r2_bridge false
|
#set_interactive r2_bridge false
|
||||||
|
|
||||||
stop
|
stop
|
||||||
|
|
||||||
> [!last_scene]
|
> [!last_scene]
|
||||||
teleport player player_start
|
teleport player player_start
|
||||||
stop
|
stop
|
||||||
|
|
||||||
#teleport player player_start
|
|
||||||
|
|
||||||
|
|
||||||
|
:ready
|
||||||
|
|
||||||
# DEBUG
|
# DEBUG
|
||||||
#set_state r2_bridge bridge_close
|
#set_state r2_bridge bridge_close
|
||||||
|
|||||||
@@ -1,7 +1,14 @@
|
|||||||
# THIS ROOMS FEATURES AN OPEN BRIDGE WITH A ***BROKEN*** BUTTON TO USE IN ORDER TO OPEN
|
# THIS ROOMS FEATURES AN OPEN BRIDGE WITH A ***BROKEN*** BUTTON TO USE IN ORDER TO OPEN
|
||||||
|
|
||||||
|
|
||||||
:setup
|
:setup
|
||||||
|
|
||||||
|
> [!room3_visited]
|
||||||
|
set_global room3_visited true
|
||||||
|
set_global r3_bridge_closed false
|
||||||
|
set_state r3_button button_broken
|
||||||
|
set_global button_broken true
|
||||||
|
|
||||||
> [r3_bridge_closed]
|
> [r3_bridge_closed]
|
||||||
# Make set_state IMMEDIATE to reach the final frame immediately
|
# Make set_state IMMEDIATE to reach the final frame immediately
|
||||||
set_state r3_bridge bridge_close true
|
set_state r3_bridge bridge_close true
|
||||||
@@ -21,16 +28,13 @@
|
|||||||
# If bridge not closed
|
# If bridge not closed
|
||||||
> [!r3_bridge_closed]
|
> [!r3_bridge_closed]
|
||||||
set_interactive r3_right_platform false
|
set_interactive r3_right_platform false
|
||||||
|
|
||||||
stop
|
stop
|
||||||
> [!last_scene]
|
> [!last_scene]
|
||||||
teleport player player_start
|
teleport player player_start
|
||||||
stop
|
stop
|
||||||
|
|
||||||
|
|
||||||
:ready
|
:ready
|
||||||
set_global r3_bridge_closed false
|
|
||||||
set_state r3_button button_broken
|
|
||||||
set_global button_broken true
|
|
||||||
|
|
||||||
# DEBUG
|
# DEBUG
|
||||||
#set_state r3_bridge bridge_close
|
#set_state r3_bridge bridge_close
|
||||||
|
|||||||
@@ -9,11 +9,7 @@
|
|||||||
# Set player look left
|
# Set player look left
|
||||||
set_angle player 270
|
set_angle player 270
|
||||||
stop
|
stop
|
||||||
> [eq ESC_LAST_SCENE ""]
|
> [!last_scene]
|
||||||
teleport player player_start
|
teleport player player_start
|
||||||
stop
|
stop
|
||||||
|
|
||||||
teleport player player_start
|
|
||||||
#walk player r_exit
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,6 @@
|
|||||||
stop
|
stop
|
||||||
|
|
||||||
|
|
||||||
:ready
|
|
||||||
#walk player r5_wrench
|
#walk player r5_wrench
|
||||||
#set_global i/r5_wrench true
|
#set_global i/r5_wrench true
|
||||||
#set_active r5_wrench false
|
#set_active r5_wrench false
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
teleport player player_start
|
teleport player player_start
|
||||||
stop
|
stop
|
||||||
|
|
||||||
:ready
|
|
||||||
#set_global i/r5_pen true
|
#set_global i/r5_pen true
|
||||||
#set_active r5_pen false
|
#set_active r5_pen false
|
||||||
#set_global i/r5_empty_sheet true
|
#set_global i/r5_empty_sheet true
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
# :SETUP is called EVERY TIME the room is loaded
|
|
||||||
# :READY is called only the FIRST TIME the room is loaded
|
|
||||||
|
|
||||||
:setup
|
:setup
|
||||||
set_state r7_button_push button_repaired
|
|
||||||
set_state r7_button_shift button_repaired
|
set_state r7_button_push button_repaired true
|
||||||
set_state r7_button_follow button_repaired
|
set_state r7_button_shift button_repaired true
|
||||||
set_state r7_button_zoom button_repaired
|
set_state r7_button_follow button_repaired true
|
||||||
|
set_state r7_button_zoom button_repaired true
|
||||||
|
|
||||||
> [eq ESC_LAST_SCENE room6]
|
> [eq ESC_LAST_SCENE room6]
|
||||||
teleport player r7_l_exit
|
teleport player r7_l_exit
|
||||||
@@ -22,17 +21,3 @@ set_state r7_button_zoom button_repaired
|
|||||||
stop
|
stop
|
||||||
|
|
||||||
|
|
||||||
:ready
|
|
||||||
|
|
||||||
#camera_push player 0 LINEAR
|
|
||||||
#camera_push r7_object2 1 LINEAR
|
|
||||||
#wait 3
|
|
||||||
#camera_push player 1 LINEAR
|
|
||||||
|
|
||||||
#camera_set_drag_margin_enabled bool bool
|
|
||||||
#camera_set_pos real int int
|
|
||||||
#camera_set_target real
|
|
||||||
#camera_set_zoom real
|
|
||||||
#camera_set_zoom_height int
|
|
||||||
#camera_shift int int
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
# :SETUP is called EVERY TIME the room is loaded
|
|
||||||
# :READY is called only the FIRST TIME the room is loaded
|
|
||||||
|
|
||||||
:setup
|
:setup
|
||||||
|
|
||||||
> [r8_m_door_open]
|
> [r8_m_door_open]
|
||||||
@@ -20,7 +17,3 @@
|
|||||||
teleport player player_start
|
teleport player player_start
|
||||||
stop
|
stop
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:ready
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
# :SETUP is called EVERY TIME the room is loaded
|
|
||||||
# :READY is called only the FIRST TIME the room is loaded
|
|
||||||
|
|
||||||
:setup
|
:setup
|
||||||
|
|
||||||
|
> [!room09_visited]
|
||||||
|
set_global room09_visited true
|
||||||
|
set_global open_closets 0
|
||||||
|
#set_state r9_closet_left closed
|
||||||
|
#set_state r9_closet_middle closed
|
||||||
|
#set_state r9_closet_right closed
|
||||||
|
|
||||||
> [eq ESC_LAST_SCENE room8]
|
> [eq ESC_LAST_SCENE room8]
|
||||||
teleport player r9_l_exit
|
teleport player r9_l_exit
|
||||||
# Set player look right
|
# Set player look right
|
||||||
@@ -17,9 +23,3 @@
|
|||||||
stop
|
stop
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:ready
|
|
||||||
set_global open_closets 0
|
|
||||||
#set_state r9_closet_left closed
|
|
||||||
#set_state r9_closet_middle closed
|
|
||||||
#set_state r9_closet_right closed
|
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
# :SETUP is called EVERY TIME the room is loaded
|
|
||||||
# :READY is called only the FIRST TIME the room is loaded
|
|
||||||
|
|
||||||
:setup
|
:setup
|
||||||
> [eq ESC_LAST_SCENE room8]
|
> [eq ESC_LAST_SCENE room9]
|
||||||
teleport player r9_l_exit
|
teleport player r10_l_exit
|
||||||
# Set player look right
|
# Set player look right
|
||||||
set_angle player 180
|
set_angle player 180
|
||||||
stop
|
stop
|
||||||
> [eq ESC_LAST_SCENE room10]
|
> [eq ESC_LAST_SCENE room11]
|
||||||
teleport player r9_r_exit
|
teleport player r10_r_exit
|
||||||
# Set player look left
|
# Set player look left
|
||||||
set_angle player 270
|
set_angle player 270
|
||||||
stop
|
stop
|
||||||
@@ -16,10 +14,3 @@
|
|||||||
teleport player player_start
|
teleport player player_start
|
||||||
stop
|
stop
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:ready
|
|
||||||
set_global open_closets 0
|
|
||||||
#set_state r9_closet_left closed
|
|
||||||
#set_state r9_closet_middle closed
|
|
||||||
#set_state r9_closet_right closed
|
|
||||||
|
|||||||
@@ -84,10 +84,10 @@ position = Vector2( 22.6786, 212.927 )
|
|||||||
script = ExtResource( 5 )
|
script = ExtResource( 5 )
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="Hotspots/button_stop_bg_music"]
|
[node name="Label" type="Label" parent="Hotspots/button_stop_bg_music"]
|
||||||
margin_left = -8.81946
|
margin_left = -20.8195
|
||||||
margin_top = -30.2381
|
margin_top = -29.2381
|
||||||
margin_right = 61.1805
|
margin_right = 87.1805
|
||||||
margin_bottom = -14.2381
|
margin_bottom = -8.2381
|
||||||
custom_fonts/font = ExtResource( 3 )
|
custom_fonts/font = ExtResource( 3 )
|
||||||
text = "Stop bg music"
|
text = "Stop bg music"
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
@@ -105,10 +105,10 @@ position = Vector2( 22.6786, 212.927 )
|
|||||||
script = ExtResource( 5 )
|
script = ExtResource( 5 )
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="Hotspots/button_play_bg_music"]
|
[node name="Label" type="Label" parent="Hotspots/button_play_bg_music"]
|
||||||
margin_left = -8.81946
|
margin_left = -18.8195
|
||||||
margin_top = -30.2381
|
margin_top = -29.2381
|
||||||
margin_right = 61.1805
|
margin_right = 85.1805
|
||||||
margin_bottom = -14.2381
|
margin_bottom = -8.2381
|
||||||
custom_fonts/font = ExtResource( 3 )
|
custom_fonts/font = ExtResource( 3 )
|
||||||
text = "Play bg music"
|
text = "Play bg music"
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
@@ -126,10 +126,10 @@ position = Vector2( 22.6786, 212.927 )
|
|||||||
script = ExtResource( 5 )
|
script = ExtResource( 5 )
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="Hotspots/button_play_sound"]
|
[node name="Label" type="Label" parent="Hotspots/button_play_sound"]
|
||||||
margin_left = -8.81946
|
margin_left = -10.8195
|
||||||
margin_top = -30.2381
|
margin_top = -29.2381
|
||||||
margin_right = 61.1805
|
margin_right = 72.1805
|
||||||
margin_bottom = -14.2381
|
margin_bottom = -8.2381
|
||||||
custom_fonts/font = ExtResource( 3 )
|
custom_fonts/font = ExtResource( 3 )
|
||||||
text = "Play sound"
|
text = "Play sound"
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
@@ -145,9 +145,10 @@ animations = null
|
|||||||
|
|
||||||
[node name="Label" type="Label" parent="Hotspots/button_accept_input"]
|
[node name="Label" type="Label" parent="Hotspots/button_accept_input"]
|
||||||
margin_left = -3.6864
|
margin_left = -3.6864
|
||||||
margin_top = -38.4435
|
margin_top = -44.4435
|
||||||
margin_right = 71.3136
|
margin_right = 85.3136
|
||||||
margin_bottom = -7.44354
|
margin_bottom = 0.556503
|
||||||
|
custom_fonts/font = ExtResource( 3 )
|
||||||
text = "Test Accept
|
text = "Test Accept
|
||||||
Input"
|
Input"
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
@@ -167,10 +168,11 @@ tooltip_name = "Test slide"
|
|||||||
animations = null
|
animations = null
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="Hotspots/button_slide"]
|
[node name="Label" type="Label" parent="Hotspots/button_slide"]
|
||||||
margin_left = -3.6864
|
margin_left = -9.6864
|
||||||
margin_top = -38.4435
|
margin_top = -28.4435
|
||||||
margin_right = 71.3136
|
margin_right = 66.3136
|
||||||
margin_bottom = -7.44354
|
margin_bottom = 2.55646
|
||||||
|
custom_fonts/font = ExtResource( 3 )
|
||||||
text = "Test Slide"
|
text = "Test Slide"
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
@@ -189,10 +191,11 @@ tooltip_name = "Test turn_to"
|
|||||||
animations = null
|
animations = null
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="Hotspots/button_turn_to"]
|
[node name="Label" type="Label" parent="Hotspots/button_turn_to"]
|
||||||
margin_left = -3.6864
|
margin_left = -14.6864
|
||||||
margin_top = -38.4435
|
margin_top = -26.4435
|
||||||
margin_right = 71.3136
|
margin_right = 80.3136
|
||||||
margin_bottom = -7.44354
|
margin_bottom = 4.55646
|
||||||
|
custom_fonts/font = ExtResource( 3 )
|
||||||
text = "Test turn_to"
|
text = "Test turn_to"
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
|
|||||||
Reference in New Issue
Block a user