Lua script for changing points (Full Version)

All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion



Message


AdmiralSteve -> Lua script for changing points (8/29/2021 2:14:16 PM)

I'm wanting to create a Special Action but I'm preferring a Lua script that can add/deduct points and be placed within the Special Action and thought that their was a script awhile ago but can't seem to locate it. Any ideas?

Thanks, Steve




KLAB -> RE: Lua script for changing points (8/30/2021 12:53:26 PM)

This works from one of my special action scripts but as ever there is probably a cleverer way of doing it, [:D]

a=ScenEdit_GetScore("Side A")
ScenEdit_SetScore('Side A',(a-4000),'-4000 Points for whatever')

k




Kushan04 -> RE: Lua script for changing points (8/30/2021 4:42:58 PM)

No need to assign the side as a variable unless you really need to.

ScenEdit_SetScore('YourSideHere', NumberOfPointsHere, 'ReasonHere')

Example
ScenEdit_SetScore('USA', 1000, 'You destroyed something')

http://commandlua.github.io/#ScenEdit_SetScore





KnightHawk75 -> RE: Lua script for changing points (8/30/2021 6:18:04 PM)

[img]https://i.postimg.cc/zHz9H7bZ/SetScore.jpg[/img]
see the example at the bottom of the function specs (though it doesn't need the tonumber() around it).




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
1.796875