debug(lua-games): прибавил print в g2_main для отладки конфетти

This commit is contained in:
min 2026-06-09 13:15:11 +03:00
parent 8321a526cd
commit ba648de09c

View File

@ -171,8 +171,18 @@ finishEvent.Event:Connect(function()
winSound:Play()
__rbxl_show_text("Победа! Ты дошёл до финиша!", 5)
-- Конфетти над игроком (паритет с JS game.scene.spawnParticles)
print("[g2] before pos call")
local pos = __rbxl_player_pos()
__rbxl_spawn_particles("confetti", pos.x, pos.y + 3, pos.z, 3, 3)
print("[g2] pos=", tostring(pos), "type=", type(pos))
if pos then
print("[g2] pos.x=", tostring(pos.x), "pos.y=", tostring(pos.y))
end
local px = (pos and pos.x) or 0
local py = (pos and pos.y) or 6
local pz = (pos and pos.z) or 33
print("[g2] spawning particles at", px, py + 3, pz)
__rbxl_spawn_particles("confetti", px, py + 3, pz, 3, 3)
print("[g2] particles call returned")
end)`,
g2_finish: `-- === Скрипт финиш-зоны (Lua) ===
-- Висит на невидимой зоне над зелёной площадкой.