Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

LuA scripting question regarding fuel state

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> LuA scripting question regarding fuel state Page: [1]
Login
Message << Older Topic   Newer Topic >>
LuA scripting question regarding fuel state - 1/10/2018 5:45:59 PM   
TheOttoman

 

Posts: 139
Joined: 12/14/2017
Status: offline
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?
Post #: 1
RE: LuA scripting question regarding fuel state - 1/10/2018 8:42:58 PM   
TheOttoman

 

Posts: 139
Joined: 12/14/2017
Status: offline
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

(in reply to TheOttoman)
Post #: 2
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> LuA scripting question regarding fuel state Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

1.125