1 person found this helpful
Here's a revision of your script which should create a series of wall models spread out across your world. I've left gaps of 10 world units between each model, so that you can see where they begin and end
-- You can use the same name for all constant elements, so long as
-- they are all of different types
vName = "wall"
-- You probably don't need to create the wall model resource more than once
wallMR = pMember.newModelResource(vName,#box)
wallMR.height = 10
wallMR.length = 50
wallMR.width = 150
-- You don't need to create the texture more than once. Note that
-- this texture will now be called "wall"
brickTex = pMember.newTexture(vName)
brickTex.member = member("brickMap")
-- You should create a distinct shader for the wall, otherwise you
-- will be modifying the default shader
vShader = pMember.newShader(vName, #standard)
vShader.texture = brickTex
vShader.textureTransform.scale = vector(0.25, 0.25, 0.25)
-- Now create a set of ten models, each with a distinct name
repeat with x = 1 to 10
vName = "wall_"&x -- "wall_1", "wall_2" ... "wall_10"
vModel = pMember.newModel(vName,wallMR)
vModel.shader = vShader
vX = x * 200 -- use a different x co-ordinate for each model
Is this the sort of thing you are looking for?
yea, thank you very much
sorry didnt know i wasnt able to click both helpful and correct this was my first post, the walls texture didnt get applyed to them