Lua Scoring

All discussions & material related to Command's Lua interface

Moderators: RoryAndersonCDT, michaelm75au, angster, MOD_Command

Post Reply
DavidRN
Posts: 91
Joined: Tue Jan 17, 2023 8:41 pm

Lua Scoring

Post by DavidRN »

Hi

Haven't used Lua scoring for a while, I have forgotten, if red (enemy) is the side I want to use for my scoring (blue)

e.g blue destroys a red aircraft +50 points, is the local side blue or red?


local side = " " -- put the side that you are keeping track of scoring here

DavidRN
User avatar
blu3s
Posts: 1081
Joined: Fri Jul 08, 2022 9:45 am

Re: Lua Scoring

Post by blu3s »

Depends on how your code is. When you check the unit side that is destroyed, you must apply your score logic in there.

Code: Select all

local unit = ScenEdit_UnitX()
...

if unit.side == "RED" then --change the score to the red side or the blueside

else 

end
...
Post Reply

Return to “Lua Legion”