I adapted the CSV file, and added as the second parameter the
TargetPlayerName.
Where relevant, the TargetPlayerName will be mentioned in the CSV
logging.
IMPORTANT, the method SCORING:ScoreCSV has been adapted!!! The second
parameter is now the TargetPlayerName. Provide a "" or nil, if there is
no TargetPlayerName, but ensure the order of the parameters is correct!
function SCORING:ScoreCSV( PlayerName, TargetPlayerName, ScoreType,
ScoreTimes, ScoreAmount, PlayerUnitName, PlayerUnitCoalition,
PlayerUnitCategory, PlayerUnitType, TargetUnitName, TargetUnitCoalition,
TargetUnitCategory, TargetUnitType )
The problems were in the EVENTDISPATCHER.
-- Reworked the Event Dispatcher code...
-- Added fields IniCategory and TgtCategory that indicate which Object
Category is involved in the Event.
-- Added fields IniPlayerName and TgtPlayerName that indicate which
Player Name is the initiator or Target (only when the Object Category is
a UNIT).
-- In the Event.lua, I poperly documented every field in EVENTDATA and
typed it correctly.
-- Reworked te Scoring code..
-- Incorporated the Event.* added fields into the Scoring Code.
-- Added a SCO-100 test mission
-- A shooting range with STATIC objects, so that a player can TEST the
scoring for STATIC objects in a mission.
Hope this helps.
FC