Action3 and Action4
This commit is contained in:
@@ -16,10 +16,10 @@ export(int) var action1_y = 0
|
|||||||
export(String) var tooltip2_name
|
export(String) var tooltip2_name
|
||||||
|
|
||||||
# Action1 tooltip text in inventory
|
# Action1 tooltip text in inventory
|
||||||
export(String) var inventory_action1_text
|
export(String) var action3_text
|
||||||
|
|
||||||
# Action2 tooltip text in inventory
|
# Action2 tooltip text in inventory
|
||||||
export(String) var inventory_action2_text
|
export(String) var action4_text
|
||||||
|
|
||||||
#$tooltips.visible = true;
|
#$tooltips.visible = true;
|
||||||
var action1Tooltip: Object
|
var action1Tooltip: Object
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
extends ESCGame
|
extends ESCGame
|
||||||
|
|
||||||
|
# Left mouse button on item
|
||||||
const ACTION1 = "action1"
|
const ACTION1 = "action1"
|
||||||
|
# Right mouse button on item
|
||||||
const ACTION2 = "action2"
|
const ACTION2 = "action2"
|
||||||
|
# Left mouse button on inventory item
|
||||||
|
const ACTION3 = "action3"
|
||||||
|
# Right mouse button on inventory item
|
||||||
|
const ACTION4 = "action4"
|
||||||
|
|
||||||
const VERB_USE = "use"
|
const VERB_USE = "use"
|
||||||
const VERB_WALK = "walk"
|
const VERB_WALK = "walk"
|
||||||
@@ -272,25 +278,25 @@ func click_on_inventory_item(item_global_id: String, event: InputEvent, action:
|
|||||||
true
|
true
|
||||||
)
|
)
|
||||||
|
|
||||||
if (target_obj is ESCItemWithTooltip) && (action == ACTION1 && target_obj.inventory_action1_text != "") || (action == ACTION2 && target_obj.inventory_action2_text != ""):
|
if (target_obj is ESCItemWithTooltip) && (action == ACTION3 && target_obj.action3_text != "") || (action == ACTION4 && target_obj.action4_text != ""):
|
||||||
$tooltip_layer/tooltip.hide()
|
$tooltip_layer/tooltip.hide()
|
||||||
$tooltip_layer/tooltip2.hide()
|
$tooltip_layer/tooltip2.hide()
|
||||||
|
|
||||||
func left_click_on_inventory_item(inventory_item_global_id: String, event: InputEvent) -> void:
|
func left_click_on_inventory_item(inventory_item_global_id: String, event: InputEvent) -> void:
|
||||||
var target_obj = escoria.object_manager.get_object(inventory_item_global_id).node
|
var target_obj = escoria.object_manager.get_object(inventory_item_global_id).node
|
||||||
if ACTION1 in target_obj.combine_when_selected_action_is_in:
|
if ACTION3 in target_obj.combine_when_selected_action_is_in:
|
||||||
Input.set_custom_mouse_cursor(target_obj.inventory_texture)
|
Input.set_custom_mouse_cursor(target_obj.inventory_texture)
|
||||||
click_on_inventory_item(inventory_item_global_id, event, ACTION1)
|
click_on_inventory_item(inventory_item_global_id, event, ACTION3)
|
||||||
|
|
||||||
func right_click_on_inventory_item(inventory_item_global_id: String, event: InputEvent) -> void:
|
func right_click_on_inventory_item(inventory_item_global_id: String, event: InputEvent) -> void:
|
||||||
click_on_inventory_item(inventory_item_global_id, event, ACTION2)
|
click_on_inventory_item(inventory_item_global_id, event, ACTION4)
|
||||||
|
|
||||||
|
|
||||||
func inventory_item_focused(inventory_item_global_id: String) -> void:
|
func inventory_item_focused(inventory_item_global_id: String) -> void:
|
||||||
var target_obj = escoria.object_manager.get_object(inventory_item_global_id).node
|
var target_obj = escoria.object_manager.get_object(inventory_item_global_id).node
|
||||||
if target_obj is ESCItemWithTooltip:
|
if target_obj is ESCItemWithTooltip:
|
||||||
$tooltip_layer/tooltip.set_target(target_obj.inventory_action1_text)
|
$tooltip_layer/tooltip.set_target(target_obj.action3_text)
|
||||||
$tooltip_layer/tooltip2.set_target(target_obj.inventory_action2_text)
|
$tooltip_layer/tooltip2.set_target(target_obj.action4_text)
|
||||||
|
|
||||||
|
|
||||||
func inventory_item_unfocused() -> void:
|
func inventory_item_unfocused() -> void:
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
:action1
|
:action3 i_bombona2
|
||||||
say player "Parece que veo a Mikel"
|
|
||||||
|
|
||||||
:action1 i_bombona2
|
|
||||||
say player "He usado la 'bombona' con la puerta"
|
say player "He usado la 'bombona' con la puerta"
|
||||||
# > [eq r5_dialog_advance 2]
|
# > [eq r5_dialog_advance 2]
|
||||||
# say player "I already fixed the water leak."
|
# say player "I already fixed the water leak."
|
||||||
@@ -13,6 +10,9 @@ say player "He usado la 'bombona' con la puerta"
|
|||||||
# set_global r5_dialog_advance 2
|
# set_global r5_dialog_advance 2
|
||||||
# accept_input ALL
|
# accept_input ALL
|
||||||
|
|
||||||
|
:action1
|
||||||
|
say player "Parece que veo a Mikel"
|
||||||
|
|
||||||
:action2
|
:action2
|
||||||
#say player "Esta cerrada por dentro."
|
#say player "Esta cerrada por dentro."
|
||||||
play_snd res://game/sfx/sounds/doorOpen_2.ogg
|
play_snd res://game/sfx/sounds/doorOpen_2.ogg
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
:action1
|
:action1
|
||||||
say player "Es naranja" [!i/i_bombona]
|
say player "Es naranja"
|
||||||
say player "Es el segundo bolsillo más grande que he visto nunca" [i/i_bombona]
|
|
||||||
|
|
||||||
:action2
|
:action2
|
||||||
> [!i/i_bombona]
|
say player "Voy a cogerla"
|
||||||
say player "Voy a cogerla"
|
set_active i_bombona false
|
||||||
set_active i_bombona false
|
inventory_add i_bombona
|
||||||
inventory_add i_bombona
|
|
||||||
stop
|
|
||||||
|
|
||||||
> [i/i_bombona]
|
:action3
|
||||||
say player "Antes era una bombona pero ahora es una llave inglesa."
|
say player "Es el segundo bolsillo más grande que he visto nunca"
|
||||||
say player "¿Esto es real?"
|
|
||||||
say player "¿Vivo en Matrix?"
|
:action4
|
||||||
|
say player "Antes era una bombona pero ahora es una llave inglesa."
|
||||||
|
say player "¿Esto es real?"
|
||||||
|
say player "¿Vivo en Matrix?"
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
:action1
|
:action1
|
||||||
say player "Es naranja" [!i/i_bombona2]
|
say player "Es naranja"
|
||||||
say player "Es el segundo bolsillo más grande que he visto nunca" [i/i_bombona2]
|
|
||||||
|
|
||||||
:action2
|
:action2
|
||||||
> [!i/i_bombona2]
|
say player "Voy a cogerla"
|
||||||
say player "Voy a cogerla"
|
set_active i_bombona2 false
|
||||||
set_active i_bombona2 false
|
inventory_add i_bombona2
|
||||||
inventory_add i_bombona2
|
|
||||||
stop
|
|
||||||
|
|
||||||
> [i/i_bombona2]
|
:action3
|
||||||
say player "Antes era una bombona pero ahora es una llave inglesa."
|
say player "Es el segundo bolsillo más grande que he visto nunca"
|
||||||
say player "¿Esto es real?"
|
|
||||||
say player "¿Vivo en Matrix?"
|
:action4
|
||||||
|
say player "Antes era una bombona pero ahora es una llave inglesa."
|
||||||
|
say player "¿Esto es real?"
|
||||||
|
say player "¿Vivo en Matrix?"
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
:action1
|
|
||||||
say player "Es naranja" [!i/i_bombona3]
|
|
||||||
say player "Es el segundo bolsillo más grande que he visto nunca" [i/i_bombona3]
|
|
||||||
|
|
||||||
:action2
|
|
||||||
> [!i/i_bombona3]
|
|
||||||
say player "Voy a cogerla"
|
|
||||||
set_active i_bombona3 false
|
|
||||||
inventory_add i_bombona3
|
|
||||||
stop
|
|
||||||
|
|
||||||
> [i/i_bombona3]
|
|
||||||
say player "Antes era una bombona pero ahora es una llave inglesa."
|
|
||||||
say player "¿Esto es real?"
|
|
||||||
say player "¿Vivo en Matrix?"
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
:action1
|
|
||||||
say player "Es naranja" [!i/i_bombona4]
|
|
||||||
say player "Es el segundo bolsillo más grande que he visto nunca" [i/i_bombona4]
|
|
||||||
|
|
||||||
:action2
|
|
||||||
> [!i/i_bombona4]
|
|
||||||
say player "Voy a cogerla"
|
|
||||||
set_active i_bombona4 false
|
|
||||||
inventory_add i_bombona4
|
|
||||||
stop
|
|
||||||
|
|
||||||
> [i/i_bombona4]
|
|
||||||
say player "Antes era una bombona pero ahora es una llave inglesa."
|
|
||||||
say player "¿Esto es real?"
|
|
||||||
say player "¿Vivo en Matrix?"
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
:action1
|
|
||||||
say player "Es naranja" [!i/i_bombona5]
|
|
||||||
say player "Es el segundo bolsillo más grande que he visto nunca" [i/i_bombona5]
|
|
||||||
|
|
||||||
:action2
|
|
||||||
> [!i/i_bombona5]
|
|
||||||
say player "Voy a cogerla"
|
|
||||||
set_active i_bombona5 false
|
|
||||||
inventory_add i_bombona5
|
|
||||||
stop
|
|
||||||
|
|
||||||
> [i/i_bombona5]
|
|
||||||
say player "Antes era una bombona pero ahora es una llave inglesa."
|
|
||||||
say player "¿Esto es real?"
|
|
||||||
say player "¿Vivo en Matrix?"
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
:action1
|
|
||||||
say player "Es naranja" [!i/i_bombona6]
|
|
||||||
say player "Es el segundo bolsillo más grande que he visto nunca" [i/i_bombona6]
|
|
||||||
|
|
||||||
:action2
|
|
||||||
> [!i/i_bombona6]
|
|
||||||
say player "Voy a cogerla"
|
|
||||||
set_active i_bombona6 false
|
|
||||||
inventory_add i_bombona6
|
|
||||||
stop
|
|
||||||
|
|
||||||
> [i/i_bombona6]
|
|
||||||
say player "Antes era una bombona pero ahora es una llave inglesa."
|
|
||||||
say player "¿Esto es real?"
|
|
||||||
say player "¿Vivo en Matrix?"
|
|
||||||
@@ -123,8 +123,8 @@ combine_when_selected_action_is_in = [ ]
|
|||||||
inventory_texture = ExtResource( 29 )
|
inventory_texture = ExtResource( 29 )
|
||||||
dialog_color = Color( 1, 1, 1, 1 )
|
dialog_color = Color( 1, 1, 1, 1 )
|
||||||
tooltip2_name = "TT2 Coger bombona"
|
tooltip2_name = "TT2 Coger bombona"
|
||||||
inventory_action1_text = "¿Cómo ha entrado en mi bolsillo?"
|
action3_text = "¿Cómo ha entrado en mi bolsillo?"
|
||||||
inventory_action2_text = "¿Por qué es una llave inglesa?"
|
action4_text = "¿Por qué es una llave inglesa?"
|
||||||
animations = null
|
animations = null
|
||||||
|
|
||||||
[node name="bombona2" parent="Hotspots" instance=ExtResource( 27 )]
|
[node name="bombona2" parent="Hotspots" instance=ExtResource( 27 )]
|
||||||
@@ -133,72 +133,12 @@ script = ExtResource( 28 )
|
|||||||
global_id = "i_bombona2"
|
global_id = "i_bombona2"
|
||||||
esc_script = "res://gymkhana/rooms/trasera_cocina/esc/i_bombona2.esc"
|
esc_script = "res://gymkhana/rooms/trasera_cocina/esc/i_bombona2.esc"
|
||||||
tooltip_name = "TT Mirar bombona"
|
tooltip_name = "TT Mirar bombona"
|
||||||
combine_when_selected_action_is_in = [ "action1" ]
|
combine_when_selected_action_is_in = [ "action3" ]
|
||||||
inventory_texture = ExtResource( 29 )
|
inventory_texture = ExtResource( 29 )
|
||||||
dialog_color = Color( 1, 1, 1, 1 )
|
dialog_color = Color( 1, 1, 1, 1 )
|
||||||
tooltip2_name = "TT2 Coger bombona"
|
tooltip2_name = "TT2 Coger bombona"
|
||||||
inventory_action1_text = "Usar"
|
action3_text = "Usar"
|
||||||
inventory_action2_text = "¿Por qué es una llave inglesa?"
|
action4_text = "¿Por qué es una llave inglesa?"
|
||||||
animations = null
|
|
||||||
|
|
||||||
[node name="bombona3" parent="Hotspots" instance=ExtResource( 27 )]
|
|
||||||
visible = false
|
|
||||||
position = Vector2( 857, 508 )
|
|
||||||
script = ExtResource( 28 )
|
|
||||||
global_id = "i_bombona3"
|
|
||||||
esc_script = "res://gymkhana/rooms/trasera_cocina/esc/i_bombona3.esc"
|
|
||||||
tooltip_name = "TT Mirar bombona"
|
|
||||||
combine_when_selected_action_is_in = [ ]
|
|
||||||
inventory_texture = ExtResource( 8 )
|
|
||||||
dialog_color = Color( 1, 1, 1, 1 )
|
|
||||||
tooltip2_name = "TT2 Coger bombona"
|
|
||||||
inventory_action1_text = "¿Cómo ha entrado en mi bolsillo?"
|
|
||||||
inventory_action2_text = "¿Por qué es una llave inglesa?"
|
|
||||||
animations = null
|
|
||||||
|
|
||||||
[node name="bombona4" parent="Hotspots" instance=ExtResource( 27 )]
|
|
||||||
visible = false
|
|
||||||
position = Vector2( 757, 508 )
|
|
||||||
script = ExtResource( 28 )
|
|
||||||
global_id = "i_bombona4"
|
|
||||||
esc_script = "res://gymkhana/rooms/trasera_cocina/esc/i_bombona4.esc"
|
|
||||||
tooltip_name = "TT Mirar bombona"
|
|
||||||
combine_when_selected_action_is_in = [ ]
|
|
||||||
inventory_texture = ExtResource( 8 )
|
|
||||||
dialog_color = Color( 1, 1, 1, 1 )
|
|
||||||
tooltip2_name = "TT2 Coger bombona"
|
|
||||||
inventory_action1_text = "¿Cómo ha entrado en mi bolsillo?"
|
|
||||||
inventory_action2_text = "¿Por qué es una llave inglesa?"
|
|
||||||
animations = null
|
|
||||||
|
|
||||||
[node name="bombona5" parent="Hotspots" instance=ExtResource( 27 )]
|
|
||||||
visible = false
|
|
||||||
position = Vector2( 557, 508 )
|
|
||||||
script = ExtResource( 28 )
|
|
||||||
global_id = "i_bombona5"
|
|
||||||
esc_script = "res://gymkhana/rooms/trasera_cocina/esc/i_bombona5.esc"
|
|
||||||
tooltip_name = "TT Mirar bombona"
|
|
||||||
combine_when_selected_action_is_in = [ ]
|
|
||||||
inventory_texture = ExtResource( 8 )
|
|
||||||
dialog_color = Color( 1, 1, 1, 1 )
|
|
||||||
tooltip2_name = "TT2 Coger bombona"
|
|
||||||
inventory_action1_text = "¿Cómo ha entrado en mi bolsillo?"
|
|
||||||
inventory_action2_text = "¿Por qué es una llave inglesa?"
|
|
||||||
animations = null
|
|
||||||
|
|
||||||
[node name="bombona6" parent="Hotspots" instance=ExtResource( 27 )]
|
|
||||||
visible = false
|
|
||||||
position = Vector2( 1057, 508 )
|
|
||||||
script = ExtResource( 28 )
|
|
||||||
global_id = "i_bombona6"
|
|
||||||
esc_script = "res://gymkhana/rooms/trasera_cocina/esc/i_bombona6.esc"
|
|
||||||
tooltip_name = "TT Mirar bombona"
|
|
||||||
combine_when_selected_action_is_in = [ ]
|
|
||||||
inventory_texture = ExtResource( 8 )
|
|
||||||
dialog_color = Color( 1, 1, 1, 1 )
|
|
||||||
tooltip2_name = "TT2 Coger bombona"
|
|
||||||
inventory_action1_text = "¿Cómo ha entrado en mi bolsillo?"
|
|
||||||
inventory_action2_text = "¿Por qué es una llave inglesa?"
|
|
||||||
animations = null
|
animations = null
|
||||||
|
|
||||||
[node name="Columna" type="Sprite" parent="."]
|
[node name="Columna" type="Sprite" parent="."]
|
||||||
|
|||||||
Reference in New Issue
Block a user