unit:GetBlueprint().Veteran.Level2
unit:GetBlueprint()
will get the blueprint from a unit.
local TableFromBlueprint = unit:GetBlueprint()
LOG(TableFromBlueprint) -- this will print the whole blueprint into the game.log
You can do it directly without storing it in TableFromBlueprint :
LOG(unit:GetBlueprint()) -- this will print the whole blueprint into the game.log
unit:GetBlueprint().Veteran
local TableFromBlueprint = unit:GetBlueprint()
LOG(TableFromBlueprint.Veteran) -- this will only print the Veteran table from the blueprint
same as before:
LOG(unit:GetBlueprint().Veteran) -- this will only print the Veteran table from the blueprint
output:
Veteran = {
Level1 = 6,
Level2 = 12,
Level3 = 18,
Level4 = 24,
Level5 = 30,
},
unit:GetBlueprint().Veteran.Level2
local TableFromBlueprint = unit:GetBlueprint()
LOG(TableFromBlueprint.Veteran.Level2) -- this will print the value stored in Veteran/Level2
same as before:
LOG(unit:GetBlueprint().Veteran.Level2) -- this will print the value stored in Veteran/Level2
output:
12