Page 1 of 1

Clear log and reset score

Posted: Sat Dec 04, 2021 1:46 pm
by nukkxx5058
Hello,

How do you force clearing the log and reset scores (all sides + expenditures) when loading a scenario ?

I can see the methods below in the documentation but no idea how to use them:

- ResetLossExp method Clears the loss and expenditure logs in scenario
- ResetScore method Clears the score and log in scenario

Thank you

RE: Clear log and reset score

Posted: Sat Dec 04, 2021 3:30 pm
by musurca
They are methods, which means that they’re member functions belonging to the Scenario object. To call them, you have to first get a valid Scenario, like so:

local scenario = VP_GetScenario()

—reset the losses and expenditures
scenario:ResetLossExp()

— reset the score
scenario:ResetScore()

RE: Clear log and reset score

Posted: Sat Dec 04, 2021 4:37 pm
by nukkxx5058
Excellent !! Thank you ! [:)]