GE Lua Documentation

Press F to search!

isWalking

Definition


-- @/lua/ge/extensions/gameplay/walk.lua:29

local function isWalking()
  return getPlayerUnicycle() ~= nil
end

Callers

@/lua/ge/extensions/core/recoveryPrompt.lua
local function buttonPressed(buttonId, target)
  if career_career and career_career.isActive() and not gameplay_walk.isWalking() and not gameplay_missions_missionManager.getForegroundMissionId() then
    core_vehicleBridge.executeAction(getPlayerVehicle(0), 'createPartConditionSnapshot', "beforeTeleport")
local function getRecoveryTargets()
  if not gameplay_walk.isWalking() then
    return {{type = "vehicle", vehId = be:getPlayerVehicleID(0)}}
@/gameplay/missionTypes/scatterPickup/customNodes/scatterCollectNode.lua

  if gameplay_walk.isWalking() then
    self.origin =core_camera.getPosition() + core_camera.getQuat()*vec3(0,walkingOffset,0)
@/lua/ge/extensions/career/modules/delivery/cargoScreen.lua
      career_modules_linearTutorial.introPopup("delivery/cargoDelivered")
      if gameplay_walk.isWalking() then
        ui_message("Press [action=reset_physics] to open the recovery menu to take a taxi.",6,"post_delivery","local_taxi")
@/lua/ge/extensions/career/career.lua
  -- enable node grabber only in walking mode
  if careerActive and (core_camera.getActiveGlobalCameraName() or not gameplay_walk.isWalking()) then
    core_input_actionFilter.setGroup('careerNodeGrabberActions', nodegrabberActions)
@/lua/ge/extensions/gameplay/drift/drift.lua
  and avrgRefPointsKphSpeed > driftOptions.minAirSpeed
  and not gameplay_walk.isWalking()
  and not isInTheAir

  if gameplay_walk.isWalking() or gameplay_drift_general.getPaused() or _dtSim <= 0 then return end
local function onVehicleCrashStarted(crashStartData)
  if gameplay_walk.isWalking() or gameplay_drift_general.getPaused() or gameplay_drift_general.getFrozen() or dtSim <= 0 then return end
@/lua/ge/extensions/gameplay/garageMode.lua
  local result = nil
  if gameplay_walk and gameplay_walk.isWalking() then
    return result
@/lua/ge/extensions/career/modules/tether.lua
local function checkBoxTether(t)
  -- we can assume getPlayerUnicycle() is not nil, because it is checked in isWalking()
  if not getPlayerVehicle(0) then return end
local function checkSphereTether(t)
  -- we can assume getPlayerUnicycle() is not nil, because it is checked in isWalking()
  if not getPlayerVehicle(0) then return end
local function checkCapsuleTether(t)
  -- we can assume getPlayerUnicycle() is not nil, because it is checked in isWalking()
  if not getPlayerVehicle(0) then return end
local function checkVehicleTether(t)
  -- we can assume getPlayerUnicycle() is not nil, because it is checked in isWalking()
  if not getPlayerVehicle(0) then return end
@/lua/ge/extensions/career/modules/vehicleShopping.lua
  local newVehObj = spawnVehicle(purchaseData.vehicleInfo, purchaseData.vehicleInfo.sellerId)
  if gameplay_walk.isWalking() then
    gameplay_walk.setRot(newVehObj:getPosition() - getPlayerVehicle(0):getPosition())
@/lua/ge/extensions/gameplay/drift/display.lua

  if math.abs(angle) < gameplay_drift_drift.getDriftOptions().maxAngle and gameplay_drift_drift.getIsOverSteering() and gameplay_drift_drift.getIsOverMinSpeedForDrift() and not gameplay_drift_drift.getIsInTheAir() and not gameplay_walk.isWalking() then
    --guihooks.trigger("setDriftRealtimeAngle", angle )
@/lua/ge/extensions/scenario/raceMarkers/attention.lua

  if gameplay_walk.isWalking() then
    if distanceFromMarker > plDistToMarkerOffset then
@/lua/ge/extensions/gameplay/traffic.lua

  if gameplay_walk.isWalking() then -- check for player unicycle
    checkPlayer(be:getPlayerVehicleID(0))
@/lua/ge/extensions/flowgraph/nodes/career/garageTutorialUtil.lua
    self.timer = self.timer -1
    if not gameplay_walk.isWalking() then
      career_modules_inventory.updatePartConditions(nil, career_modules_inventory.getInventoryIdFromVehicleId(be:getPlayerVehicleID(0)))
@/lua/ge/extensions/gameplay/taxi.lua
local function isTaxiAvailable()
  return currentStep == steps.nothing and gameplay_walk.isWalking() and nearestTaxiId
end

  if currentStep == steps.taxiCalled and gameplay_walk.isWalking() and getObjectByID(currentTaxiId):getVelocity():len() < 1 then
    local dist = be:getPlayerVehicle(0):getPosition():distance(map.objects[currentTaxiId].pos)
@/lua/ge/extensions/career/modules/loanerVehicles.lua
          local camDir = offer.vehPos - getPlayerVehicle(0):getPosition()
          if gameplay_walk.isWalking() then
            gameplay_walk.setRot(camDir)
@/lua/ge/extensions/career/modules/painting.lua

  if gameplay_walk.isWalking() then
    walkingPositionBefore = getPlayerVehicle(0):getPosition()
@/lua/ge/extensions/gameplay/missions/missionScreen.lua
        missionCards = M.getMissionTiles(ids), -- for some us test
        --isWalking = gameplay_walk.isWalking(),
        --isCareerActive = career_career.isActive(),
    -- if the player uses own vehicle and walks, disable starting.
    if gameplay_walk.isWalking() then
      sendStartingOptions(id, cantStartWalkingOptions, entryFeeAsList)
@/lua/ge/extensions/gameplay/missions/missionManager.lua
      if veh then
        if gameplay_walk and gameplay_walk.isWalking() then
          gameplay_walk.getInVehicle(veh)
@/lua/ge/extensions/career/modules/insurance/insurance.lua

  if gameplay_walk.isWalking() then
    activeInsuranceId = -1
    career_modules_fuel.minimumRefuelingCheck(vehId)
    if gameplay_walk.isWalking() then
      local veh = getObjectByID(vehId)
local function onUpdate(dtReal, dtSim, dtRaw)
  if not gameplay_missions_missionManager.getForegroundMissionId() and not gameplay_walk.isWalking() and activeInsuranceId > 0 then -- we don't track when in a mission
    checkRenewInsurance()
@/lua/ge/extensions/career/modules/inventory.lua

  if gameplay_walk.isWalking() then
    local playerVeh = getPlayerVehicle(0)
  else
    if gameplay_walk.isWalking() then
      if unicycleSavedPosition then
@/lua/ge/extensions/career/modules/partShopping.lua

  if gameplay_walk.isWalking() then
    gameplay_walk.setRot(getCurrentVehicleObj():getPosition() - getPlayerVehicle(0):getPosition())
@/lua/ge/extensions/flowgraph/nodes/gameplay/canEnterFromWalking.lua
function C:work(args)
  self.pinOut.canEnter.value = gameplay_walk.isWalking() and gameplay_walk.getVehicleInFront() and gameplay_walk.isAtParkingSpeed()
  self.pinOut.closeButNotStopped.value = gameplay_walk.isWalking() and gameplay_walk.getVehicleInFront() and not gameplay_walk.isAtParkingSpeed()
  self.pinOut.canEnter.value = gameplay_walk.isWalking() and gameplay_walk.getVehicleInFront() and gameplay_walk.isAtParkingSpeed()
  self.pinOut.closeButNotStopped.value = gameplay_walk.isWalking() and gameplay_walk.getVehicleInFront() and not gameplay_walk.isAtParkingSpeed()
  self.pinOut.vehId.value = gameplay_walk.getVehicleInFront() and gameplay_walk.getVehicleInFront():getID() or nil
  if gameplay_walk then
    editor.uiIconImage(editor.icons.simobject_bng_vehicle, im.ImVec2(40, 40), (gameplay_walk.isWalking() and gameplay_walk.getVehicleInFront() and gameplay_walk.isAtParkingSpeed()) and im.ImVec4(0.3,1,0.3,1) or im.ImVec4(1,1,1,0.3))
  end
@/lua/ge/extensions/career/modules/playerDriving.lua
  end
  if not gameplay_walk.isWalking() then
    gameplay_parking.enableTracking(newId)
    elseif action == "reset" or action == "evade" then -- pursuit ended, return to normal
      if not gameplay_walk.isWalking() then
        gameplay_parking.enableTracking(vehId)
  local camDir = pos - getPlayerVehicle(0):getPosition()
  if gameplay_walk.isWalking() then
    gameplay_walk.setRot(camDir)
@/lua/ge/extensions/ui/apps/minimap/vehicles.lua
  --playerVehicle = getPlayerVehicle(0)
  local isWalking = gameplay_walk.isWalking()
  if isWalking then
    end
    drawVehicle(pos, fwd, currentStyleColorSet.clrFocus, 1, gameplay_walk.isWalking(), layers.VEHICLE_PLAYER)
  end
@/lua/ge/extensions/gameplay/markerInteraction.lua
  -- this is 64 garbage
  updateData.isWalking = gameplay_walk and gameplay_walk.isWalking() or false
@/lua/ge/extensions/core/quickAccess.lua
      local vehicleInFront = gameplay_walk.getVehicleInFront()
      local title = gameplay_walk.isWalking() and
      (vehicleInFront and "ui.radialmenu2.enterVehicle" or "ui.radialmenu2.noVehicleToEnter") or
      local e = {
        title = title, icon = gameplay_walk.isWalking() and "seatArrowInLeft" or "seatArrowOut", startSlot = 1, priority = 94, ignoreAsRecentActionForCategory = "playerVehicle",
        enabled = not gameplay_walk.isWalking() or vehicleInFront ~= nil, uniqueID = "toggleWalkingMode",
        title = title, icon = gameplay_walk.isWalking() and "seatArrowInLeft" or "seatArrowOut", startSlot = 1, priority = 94, ignoreAsRecentActionForCategory = "playerVehicle",
        enabled = not gameplay_walk.isWalking() or vehicleInFront ~= nil, uniqueID = "toggleWalkingMode",
        onSelect = function()
@/lua/ge/extensions/career/modules/delivery/vehicleOfferManager.lua
    step.makeStepReturnTrueFunction(function()
      if gameplay_walk.isWalking() then
        local veh = getObjectByID(vehId)
      local camDir = veh:getPosition() - getPlayerVehicle(0):getPosition()
      if gameplay_walk.isWalking() then
        gameplay_walk.setRot(camDir)
@/lua/ge/extensions/career/modules/testDrive.lua

      if gameplay_walk.isWalking() then
        gameplay_walk.getInVehicle(vehicle) -- hack
@/lua/ge/extensions/flowgraph/nodes/gameplay/isWalking.lua
function C:_executionStarted()
  self.prevWalk = gameplay_walk.isWalking()
end
function C:work(args)
  local walk = gameplay_walk.isWalking()
  self.pinOut.walking.value = walk
  if gameplay_walk then
    editor.uiIconImage(editor.icons.directions_walk, im.ImVec2(40, 40), gameplay_walk.isWalking() and im.ImVec4(0.3,1,0.3,1) or im.ImVec4(1,1,1,0.3))
  end