LuA scripting question regarding fuel state (Full Version)

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



Message


TheOttoman -> LuA scripting question regarding fuel state (1/10/2018 5:45:59 PM)

I'm working on a scenario that has a cyber warfare event that needs to outright cripple an air platform whether or not it is ready, in flight, or in reserve. The best way I think that I can simulate it specifically for platform in flight is to drain all of the fuel to zero, and then change all of the non flying platforms to a Maintenance status with a ready time that extends out past the scenario (or until I decide the hack is over).

My question is, does anyone have a LuA script that can adjust fuel level to zero?




TheOttoman -> RE: LuA scripting question regarding fuel state (1/10/2018 8:42:58 PM)

HA! I figured it out:

This is specifically for aircraft fuel (fuel type: 2001)
u = ScenEdit_GetUnit({side='sidename',name='unitname' })
local newfuel = u.fuel
newfuel[2001].current = 0
u.fuel = newfuel




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.703125