Working on taxi logic

This commit is contained in:
Vladislav Khorev committed 2026-06-09 14:06:43 +03:00
1 parent 77c8471636
commit b94f02bd77
10 files changed
+95 -15

No files matched your search

@@ -15,15 +15,15 @@
},
{
"id": "tp_loc2_to_loc1",
"positionX": 8.2,
"positionX": 6.6335,
"positionY": 0.0,
"positionZ": -9.9,
"positionZ": -9.65,
"radius": 1.5,
"active": true,
"destinationLocation": "uni_interior",
"destinationPositionX": 2.64621,
"destinationPositionX": 1.05971,
"destinationPositionY": 0.0,
"destinationPositionZ": -9.37259,
"destinationPositionZ": -9.63831,
"destinationRotationY": -1.5708
}
]
@@ -2,15 +2,15 @@
"teleports": [
{
"id": "tp_loc1_to_loc2",
"positionX": 2.64621,
"positionX": 3.39902,
"positionY": 0.0,
"positionZ": -9.37259,
"radius": 1.5,
"positionZ": -10.1046,
"radius": 1.8,
"active": true,
"destinationLocation": "uni_exterior",
"destinationPositionX": 8.2,
"destinationPositionX": 8.9718,
"destinationPositionY": 0.0,
"destinationPositionZ": -9.9,
"destinationPositionZ": -9.57324,
"destinationRotationY": 0.0
}
]
@@ -4,7 +4,7 @@
"id": "taxi_zone001",
"positionX": -15.0359,
"positionY": 0.0,
"positionZ": -30.2937,
"positionZ": -36.135,
"radius": 4.0,
"hysteresis": 0.4,
"enabled": true
+9
View File
@@ -244,6 +244,7 @@ game_api.set_location_callbacks(
print("Enter location dorm")
local hp = game_api.getFloatValue("player_hp")
game_api.set_player_hp(hp)
game_api.set_teleport_active(0, false)
end,
function()
print("Exit location dorm")
@@ -257,5 +258,13 @@ game_api.deactivate_interactive_object("Room_Cover_LivingRoom_W_N_2_001")
game_api.rotate_object("Door_Utility_-1_1_2_Leaf_001", 90, 0.01, nil)
game_api.rotate_object("Door_Utility_-1_-1_2_Leaf_001", -90, 0.01, nil)
game_api.set_call_taxi_callback(
function()
game_api.set_teleport_active(0, true)
game_api.set_trigger_zone_enabled(0, false)
end
)
game_api.switch_navigation(0)
print("Lua script loaded successfully--!")
+23 -1
View File
@@ -55,6 +55,7 @@ game_api.set_location_callbacks(
print("Enter location uni exterior")
local hp = game_api.getFloatValue("player_hp")
game_api.set_player_hp(hp)
game_api.set_teleport_active(0, false)
end,
function()
print("Exit location uni exterior")
@@ -74,4 +75,25 @@ game_api.set_trigger_zone_callbacks("darklands_exit002",
game_api.set_trigger_zone_callbacks("darklands_exit003",
darklands_exit001_enter_callback,
nil
)
)
function taxi_zone001_enter_callback()
game_api.start_dialogue("dialog_taxi001")
game_api.set_trigger_zone_enabled(0, false)
end
game_api.set_call_taxi_callback(
function()
game_api.set_teleport_active(0, true)
game_api.set_trigger_zone_enabled(0, false)
end
)
game_api.set_trigger_zone_callbacks("taxi_zone001",
taxi_zone001_enter_callback,
nil
)