Files
ashlar/scripts/dataTableBuilder.lua
T
David Cernat c3407bac45 [General] Rename refIndex into uniqueIndex
This helps improve clarity by preventing confusion between the refNum and the combination of a refNum and an mpNum that is now called the uniqueIndex.
2018-07-13 04:31:38 +03:00

23 lines
534 B
Lua

dataTableBuilder = {}
dataTableBuilder.BuildAIData = function(action, targetPid, targetUniqueIndex,
posX, posY, posZ, distance, duration, shouldRepeat)
local ai = {}
ai.action = action
ai.posX, ai.posY, ai.posZ = posX, posY, posZ
ai.distance = distance
ai.duration = duration
ai.shouldRepeat = shouldRepeat
if targetPid ~= nil then
ai.targetPlayer = Players[targetPid].accountName
else
ai.targetUniqueIndex = targetUniqueIndex
end
return ai
end
return dataTableBuilder