Time to Ready

All discussions & material related to Command's Lua interface

Moderators: RoryAndersonCDT, michaelm75au, angster, MOD_Command

Post Reply
User avatar
Gunner98
Posts: 5998
Joined: Fri Apr 29, 2005 12:49 am
Location: The Great White North!
Contact:

Time to Ready

Post by Gunner98 »

Adding a squadron to a base and everything is working except the ready time. I would like the AC to be ready in 60 min but that is not working.

Probably something simple but have tried a bunch of different ways. Any thoughts?


for i=1,8 do
ScenEdit_AddUnit({side= 'Australasia', type ='Air', DBID=1692, LoadoutID=8835, TimeToReady_Minutes=60, unitname ='77th ARS Totin Tigers #'..i, base= 'Andersen AFB'})
end

Thanks
Check out our novel, Northern Fury: H-Hour!: http://northernfury.us/
And our blog: http://northernfury.us/blog/post2/
Twitter: @NorthernFury94 or Facebook https://www.facebook.com/northernfury/
Parel803
Posts: 962
Joined: Thu Oct 10, 2019 3:39 pm
Location: Netherlands

RE: Time to Ready

Post by Parel803 »

Not sure if I'm helping but I got from someone to make a second line:
ScenEdit_SetLoadout({unitname=u.guid, loadoutid=0, timetoready_minutes=60});
with regards Gert-Jan
Kushan04
Posts: 1237
Joined: Tue Jun 28, 2005 9:27 pm
Location: USA
Contact:

RE: Time to Ready

Post by Kushan04 »

According the the Lua wiki, readytime is read only for the AddUnit function. SetLoadout should work.

Should look something like this.

Code: Select all

 ScenEdit_SetLoadout({UnitNameOrID='1023 Sqd. #1', LoadoutID=7697, TimeToReady_Minutes=30, IgnoreMagazines='True'})
 
User avatar
Gunner98
Posts: 5998
Joined: Fri Apr 29, 2005 12:49 am
Location: The Great White North!
Contact:

RE: Time to Ready

Post by Gunner98 »

Thankyou Parel803 and Kushan --- worked the charm.

Cheers

B
Check out our novel, Northern Fury: H-Hour!: http://northernfury.us/
And our blog: http://northernfury.us/blog/post2/
Twitter: @NorthernFury94 or Facebook https://www.facebook.com/northernfury/
User avatar
michaelm75au
Posts: 12463
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: Time to Ready

Post by michaelm75au »

The ready time is an attribute of the loadout not the aircraft.[:D]
It is a bit confusing as the loadouts have a default ready time, but the aircraft/ship have a timer to become 'ready'.
Michael
Post Reply

Return to “Lua Legion”