Здравствуйте, в addon_game_mod.lua вствавил скрипт:
function OnStartTouch(trigger_hero)
-- Get the position of the "point_teleport_spot"-entity we put in our map
local point = entities:FindByName( nil, "point_teleport_spot" ):GetAbsOrigin()
-- Find a spot for the hero around 'point' and teleports to it
FindClearSpaceForUnit(trigger.activator, point, false)
-- Stop the hero, so he doesn't move
trigger.activator:Stop()
-- Refocus the camera of said player to the position of the teleported hero.
SendToConsole("dota_camera_center")
end
Создал триггер trigger_hero, что нужно создать и назвать point_teleport_spot"-entity чтоб телепорт работал, спасибо за внимание.
function OnStartTouch(trigger_hero)
-- Get the position of the "point_teleport_spot"-entity we put in our map
local point = entities:FindByName( nil, "point_teleport_spot" ):GetAbsOrigin()
-- Find a spot for the hero around 'point' and teleports to it
FindClearSpaceForUnit(trigger.activator, point, false)
-- Stop the hero, so he doesn't move
trigger.activator:Stop()
-- Refocus the camera of said player to the position of the teleported hero.
SendToConsole("dota_camera_center")
end
Создал триггер trigger_hero, что нужно создать и назвать point_teleport_spot"-entity чтоб телепорт работал, спасибо за внимание.
Последнее редактирование модератором: