Possible issue with readytime_v? (Full Version)

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



Message


LettuceTurnipTheBeet -> Possible issue with readytime_v? (1/2/2022 6:37:27 PM)

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




KnightHawk75 -> RE: Possible issue with readytime_v? (1/6/2022 9:29:39 PM)

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.









Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
2.186523