Page 1 of 1
Difference between condition/condition_v
Posted: Sat Mar 26, 2022 9:05 pm
by vettim89
Topic says it all - what is the difference between condition and condition-v in the unit wrapper? Also, what are the values that can be assigned to each?
Re: Difference between condition/condition_v
Posted: Sat Mar 26, 2022 10:15 pm
by KnightHawk75
vettim89 wrote: Sat Mar 26, 2022 9:05 pm
Topic says it all - what is the difference between condition and condition-v in the unit wrapper? Also, what are the values that can be assigned to each?
Just as the documents state - but doesn't necessarily go on to explain.
.condition is a string description (can vary depending on context/unit type), generally* it's not what you want to do 'compares' against and is more for display imho.
.condition_v is a string representation of the enum code value (ie a number) that represent the basic condition, this generally is what you want to do compares against and generally* more for logic imho.
I've posed the list a few times if you search for my name and condition_v using the new forum search feature (I suggest advanced view and topic-lists vs post listings).
See here for a list, it's from 2020, I think it still the same, shows you the .condition and related .condition_v values.
https://www.matrixgames.com/forums/view ... 4#p4634064
In short if your trying to check if say an aircraft is in parked condition you would use if wrapper.condition_v == "Parked" then.. whatever. But if you wanted to specifically know if it was in a hanger or flightdeck you could check .condition and see if it contained the strings "hanger" or "flightdeck".
Re: Difference between condition/condition_v
Posted: Sat Mar 26, 2022 10:33 pm
by vettim89
Thanks as always Mr.. Knighthawk, sir