Page 1 of 1

Lua Scoring

Posted: Mon Apr 10, 2023 9:04 pm
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

Re: Lua Scoring

Posted: Tue Apr 11, 2023 4:32 pm
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
...