Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Possible issue with readytime_v?

 
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 >> Possible issue with readytime_v? Page: [1]
Login
Message << Older Topic   Newer Topic >>
Possible issue with readytime_v? - 1/2/2022 6:37:27 PM   
LettuceTurnipTheBeet

 

Posts: 7
Joined: 12/18/2021
Status: offline
I noticed a certain issue with the recently added return value readytime_v which is supposed to return the time to ready a loadout in seconds. When used on an unit accessed with ScenEdit_GetUnit(), it works properly, but when applied to an unit resolved with VP_GetUnit(), it returns KeraLua. LuaFunction. Is this a bug or stemming from my lack of understanding of difference between the two methods? A variable added in the same update, aibornetime_v works properly for both functions.

Lua version: Lua 5.3
>> print(ScenEdit_GetUnit({name='F-15C Eagle', guid='RZD6HZ-0HMED50S0BD0F'}).readytime_v)
0
>> print(VP_GetUnit({name='F-15C Eagle', guid='RZD6HZ-0HMED50S0BD0F'}).readytime_v)
KeraLua.LuaFunction
>> print(ScenEdit_GetUnit({name='F-15C Eagle', guid='RZD6HZ-0HMED50S0BD0F'}).airbornetime_v)
27
>> print(VP_GetUnit({name='F-15C Eagle', guid='RZD6HZ-0HMED50S0BD0F'}).airbornetime_v)
27
Post #: 1
RE: Possible issue with readytime_v? - 1/6/2022 9:29:39 PM   
KnightHawk75

 

Posts: 1450
Joined: 11/15/2018
Status: offline
I can say that VP_GetUnit() returns an ActiveUnit wrapper.
SE_GetUnit() returns an ActiveUnit_SE wrapper. An ActiveUnit_SE wrapper object contains readytime_v, ActiveUnit at present does not contain this property. So that's likely where the issue you experience comes from. airborntime_v on the other hand is contained in an ActiveUnit.

Reason the later works in either case is probably because as I recall GetUnit constructs it's returned ActiveUnit_SE off the base of an ActiveUnit. As for if readytime_v should actually be in ActiveUnit and not ActiveUnit_SE I couldn't really say and is one for Michael or the other devs.






(in reply to LettuceTurnipTheBeet)
Post #: 2
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> Possible issue with readytime_v? 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

0.953