local gethidepos = function()
local mapInfo = _UserService.LocalPlayer.CurrentMap.MapInfoComponent
local BoundLb = mapInfo.BoundLb
local BoundRt = mapInfo.BoundRt
local HidePos = Vector2((BoundLb.x + BoundRt.x) / 2, BoundLb.y + 100)
return HidePos
end
local teleportTo = function(dest)
_UserService.LocalPlayer.WsUser:SetMovementEnable(false)
_UserService.LocalPlayer.TransformComponent.WorldPosition = dest
end
local savedPosition = nil
zz_y7.reppt2_func = function(self)
local map_name = _UserService.LocalPlayer.CurrentMapName
local entities = _UserService:GetUsersByMapName(map_name)
local other_users_count = #entities - 1 -- Subtract 1 for the local player
if other_users_count > 0 or savedPosition ~= nil then
-- 유저가 있거나 이전에 저장된 위치가 있을 때만 실행됩니다.
local target = _UserService.LocalPlayer
local targetX = target.TransformComponent.WorldPosition.x
local targetY = target.TransformComponent.WorldPosition.y
if other_users_count > 0 then
-- 유저 감지 시, 현재 위치를 저장합니다.
savedPosition = {x = targetX, y = targetY}
-- 유저 감지 메시지와 함께 현재 좌표도 출력합니다.
_ChatMessageLogic:Add(_ChatMessageType.Yellow, "유저 감지: " .. other_users_count .. "명")
_ChatMessageLogic:Add(_ChatMessageType.Yellow, "현재 위치: X=" .. targetX .. ", Y=" .. targetY)
end
-- 맵에서 안 보이는 위치로 이동하는 로직
if savedPosition ~= nil and other_users_count > 0 then
local hidePos = gethidepos() -- 숨는 위치를 가져옵니다.
teleportTo(hidePos) -- 가져온 숨는 위치로 텔레포트합니다.
end
end
-- 유저가 없고, 저장된 위치가 있을 경우, 저장된 위치로 다시 이동합니다.
if other_users_count == 0 and savedPosition ~= nil then
teleportTo(savedPosition) -- 저장된 위치로 텔레포트합니다.
savedPosition = nil -- 저장된 위치를 초기화합니다.
endend
| 제목 | 작성자 | 작성일 | 조회 | |
|---|---|---|---|---|
| 21594 | 매크로신고+1 | 01-29 | 246 | |
| 21593 | 01-29 | 492 | ||
| 21592 | 01-29 | 211 | ||
| 21591 | 01-29 | 129 | ||
| 21590 | 01-29 | 277 | ||
| 21589 | 01-29 | 148 | ||
| 21588 | 듀프핵+3 | 01-29 | 344 | |
| 21587 | 01-29 | 783 | ||
| 21586 | 01-29 | 823 | ||
| 21585 | 01-29 | 323 | ||
| 21584 | 01-29 | 615 | ||
| 21583 | 01-29 | 391 | ||
| 21582 | 01-29 | 407 | ||
| 21581 | 01-29 | 245 | ||
| 21580 | 잠언 지언 공중듀프+14 | 01-29 | 418 | |
| 21579 | 01-29 | 250 | ||
| 21578 | 01-29 | 155 | ||
| 21577 | 01-29 | 382 | ||
| 21576 | 01-29 | 175 | ||
| 21575 | 01-29 | 228 |
댓글2
커맨드도 건드림 ?
형님 어떻게 됐나요?