metricAdd
Definition
-- @/lua/vehicle/extensions/gameplayStatistic.lua:14
local function metricAdd(name,value,aggregate)
obj:queueGameEngineLua("gameplay_statistic.metricAdd("..dumps(name)..","..tostring(value)..","..tostring(aggregate)..")")
end
Callers
@/lua/vehicle/extensions/gameplayStatisticModules/watchBurnout.lua
if burnOutTime > 0.1 then
gameplayStatistic.metricAdd("vehicle/airtime.time", burnOutTime, true)
end
@/lua/ge/extensions/gameplay/statistic.lua
local function metricAdd(name,value,aggregate)
if name==nil then log("E", "metricAdd", "invalid metric name") return end
if timers[name].increment then
metricAdd(name, value, timers[name].aggregate)
else
-- log("E","onScenarioLoaded", dumps(data))
metricAdd("scenario/finished",1)
startActivity()
startActivity()
metricAdd("scenario/restarted",1)
end
end
metricAdd("vehicle/switch",1)
end
local function onVehicleResetted(vid)
if currentPlayerVehicleId==vid then metricAdd("vehicle/reset",1) end
end
@/lua/ge/extensions/gameplay/statisticModules/watchRollover.lua
-- log("I","","rolllllllll")
gameplay_statistic.metricAdd("vehicle/rollover",1)
-- else
@/lua/vehicle/extensions/gameplayStatisticModules/watchAirtime.lua
if airTime > 0.1 then
gameplayStatistic.metricAdd("vehicle/airtime.time", airTime, true)
end
@/lua/vehicle/extensions/odometer.lua
-- log("E","stat","m="..dumps(model).."\t"..dumps(relativeOdometer-submitedStatOdo))
extensions.gameplayStatistic.metricAdd("vehicle/odometer/" .. model .. ".length", relativeOdometer - submitedStatOdo)
extensions.gameplayStatistic.metricAdd("vehicle/total_odometer.length", relativeOdometer - submitedStatOdo)
extensions.gameplayStatistic.metricAdd("vehicle/odometer/" .. model .. ".length", relativeOdometer - submitedStatOdo)
extensions.gameplayStatistic.metricAdd("vehicle/total_odometer.length", relativeOdometer - submitedStatOdo)
submitedStatOdo = relativeOdometer
@/lua/ge/extensions/career/modules/fuel.lua
career_modules_playerAttributes.addAttributes({money=-overallPrice}, {tags={"fuel","buying"},label = "Refuelled at "..(translateLanguage(gasStation.facility.name, gasStation.facility.name, true))})
gameplay_statistic.metricAdd("career/fuel/paidPrice.money", overallPrice)
end
@/lua/ge/extensions/gameplay/drift/statistics.lua
gameplay_statistic.metricAdd("drift/rightDrifts", data.chainDriftData.rightDrifts)
gameplay_statistic.metricAdd("drift/leftDrifts", data.chainDriftData.leftDrifts)
gameplay_statistic.metricAdd("drift/rightDrifts", data.chainDriftData.rightDrifts)
gameplay_statistic.metricAdd("drift/leftDrifts", data.chainDriftData.leftDrifts)
local function onDriftCompletedScored(data)
gameplay_statistic.metricAdd("drift/totalScore", data.addedScore)
setNewMaxStat("drift/maxDriftScore", data.addedScore)
local function onDriftSpinout()
gameplay_statistic.metricAdd("drift/spinOuts", 1)
end
local function onDriftCrash()
gameplay_statistic.metricAdd("drift/crashes", 1)
end
@/lua/vehicle/extensions/gameplayStatistic.lua
local function metricAdd(name,value,aggregate)
obj:queueGameEngineLua("gameplay_statistic.metricAdd("..dumps(name)..","..tostring(value)..","..tostring(aggregate)..")")
end
@/lua/ge/extensions/gameplay/statisticModules/watchJturn.lua
-- log("I","","JTURN")
gameplay_statistic.metricAdd("vehicle/jturn",1)
cancel()
-- log("I","","rolllllllll")
-- gameplay_statistic.metricAdd("vehicle/rollover",1)
-- else