Hello all,
is it possible to use multiple variables in the ELSE statement of a construction file? For a building asset I want to use 3 separate input variables for the user the choose a model. Based on the combination of the 3 selections the mdl file must then be defined from the else statement in the updateFn. But I can't find a way to use all 3 parameters at once, e.g. with an AND or nested ELSE statements. Here below a theoritical example of the nested ELSE, it doesn't return errors, but the models bko_b*.mdl's aren't returned in game.
if params.bko_a == 0 then result.models[#result.models+1] = { id = "building/bko_aa.mdl", transf = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } }
elseif params.a == 1 then result.models[#result.models+1] = { id = "building/bko_ab.mdl", transf = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } }
elseif params.a == 2 then
if params.b == 0 then result.models[#result.models+1] = { id = "building/bko_vollmer5605/bko_ba.mdl", transf = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } } }
elseif params.b == 1 then result.models[#result.models+1] = { id = "building/bko_vollmer5605/bko_bb.mdl", transf = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } } }
elseif params.b == 2 then result.models[#result.models+1] = { id = "building/bko_vollmer5605/bko_ba.mdl", transf = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } }
result.models[#result.models+1] = { id = "building/bko_vollmer5605/bko_bb.mdl", transf = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } }
end
elseif params.a == 3 then result.models[#result.models+1] = { id = "building/bko_ac.mdl", transf = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } }
end
Anyone who knows how to get round this?
Thanks, Danke,
B|ko
PS Antworten auf Deutsch sind ebenfalls willkommen