Added management of overlapped item in room 9.

This commit is contained in:
Julian Murgia
2021-02-03 22:40:50 +01:00
parent 89d52c32f8
commit 4f2977ea98
9 changed files with 89 additions and 123 deletions

8
game/items/escitems/bottle.esc Executable file
View File

@@ -0,0 +1,8 @@
:look
say player "It's a bottle."
stop
:pickup
inventory_add r9_bottle true
set_active r9_bottle false

View File

@@ -0,0 +1,28 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://addons/escoria-core/game/core-scripts/escitem.gd" type="Script" id=1]
[ext_resource path="res://game/items/textures/genericItem_color_127.png" type="Texture" id=2]
[ext_resource path="res://game/items/inventory/bottle_escinventoryitem.tscn" type="PackedScene" id=3]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 28.3873, 74.7806 )
[node name="bottle" type="Area2D"]
z_index = 1
script = ExtResource( 1 )
global_id = "r9_bottle"
esc_script = "res://game/items/escitems/bottle.esc"
tooltip_name = "Bottle"
default_action = "pickup"
use_from_inventory_only = true
inventory_item_scene_file = ExtResource( 3 )
dialog_color = Color( 1, 1, 1, 1 )
interact_positions = {
"default": Vector2( 59.3937, 58.8658 )
}
[node name="Sprite" type="Sprite" parent="."]
texture = ExtResource( 2 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 1 )