채팅0

    마박 10ㅂㄴ

    조회수 404

    if _InputService:IsPointerOverUI() then

    return

    end

    --_ChatMessageLogic:Add(_ChatMessageType.System, "cursor: " .. _InputService:GetCursorPosition())

    --local cursor_pos = _UILogic.ScreenToWorldPosition(_InputService:GetCursorPosition())

    --_ChatMessageLogic:Add(_ChatMessageType.System, "teleporting!!")

    local cursor = _InputService:GetCursorPosition()

    --_ChatMessageLogic:Add(_ChatMessageType.System, "-> " .. cursor.x .. " " .. cursor.y)

    local cursor_world_pos = _UILogic:ScreenToWorldPosition(cursor)

    --_ChatMessageLogic:Add(_ChatMessageType.System, "=> " .. cursor_world_pos.x .. " " .. cursor_world_pos.y)

    local c_pos = cursor_world_pos:ToVector3()

    c_pos.x -= 1

    _UserService.LocalPlayer.TransformComponent.WorldPosition = c_pos

    local player_pos = _UserService.LocalPlayer.TransformComponent.WorldPosition

    local output = {}

    local distanceTable = {}

    local box = BoxShape(Vector2(0.0, 0.0), Vector2(200.0, 200.0), 0) --> i think 0 still god cuzof size

    local simulator = _CollisionService:GetSimulator(_UserService.LocalPlayer.WsCharacterData.Entity)

    local temp = {}

    local hit = simulator:OverlapAllFast(CollisionGroups.MapleMob, box, temp)

    local output2 = {}

    local count = bono.filter_only_live_mobs(hit, temp, output)

    	for _, mob in ipairs(output) do
    		mob.Entity.TransformComponent.WorldPosition = cursor_world_pos:ToVector3()
    	end
    end
    ------------ zz_y7 ------------
    if (user.WsUser:IsAvailablePlayerMovement() and user.MovementComponent.Enable) then
    	if (_InputManager:IsPressed(_FuncKeySystemType.Attack)) then
    		local darkSight = user.PlayerTemporaryStat:GetValue(_CTS.DarkSight) > 0
    		if (darkSight) then
    			local reason = user.PlayerTemporaryStat:GetReason(_CTS.DarkSight)
    			_UserSkillLogic:TryCancelTemporaryStat(user, reason)
    			_InputManager:MarkNoKeyInputFuncKey(_FuncKeyTypes.System, _FuncKeySystemType.Attack)
    		else
    			local currentState = user.StateComponent.CurrentStateName
    			if (currentState ~= "SIT") then
    				local shootAttack = _PlayerAttackLogic:CheckAvailableShootAttack(user, 0, 0)
    				if (shootAttack) then
    					local output = {}
    					if (_PlayerAttackLogic_Melee:TryDoingMeleeAttack(user, 0, 0, output, 0, 0) == 0) then
    						_PlayerAttackLogic_Shoot:TryDoingShootAttack(user, 0, 0, output.ShootRange, 0)
    					end
    				else
    					_PlayerAttackLogic_Melee:TryDoingMeleeAttack(user, 0, 0, nil, 0, 0)
    				end
    			end
    		end
    	elseif (_InputManager:IsPressed(_FuncKeySystemType.Jump)) then
    		local currentState = user.StateComponent.CurrentStateName
    		self:TryJump(currentState)
    	end
    end

    댓글1

    회원프로필

    ?

    2024.02.01 03:22

      게시글 리스트
      제목작성자작성일조회
      공지10-2022120
      6167014:2413
      6166914:0822
      6166811:3944
      6166701:52141
      6166611-12167
      6166511-12209
      6166411-12256
      6166311-11379
      6166211-11364
      6166111-11502
      6166011-11408
      6165911-11556
      6165811-10475
      6165711-10503
      6165611-10483
      6165511-10548
      6165411-10669
      6165311-10628
      6165211-09697
      안내 배너 이미지