ricardoarango
06-20-2007, 04:00 AM
I want to use max as a game(level) editor. I have game specific objects that need to be placed all around the level.
My approach is to create every object in a separate max file. Then when creating the level using an scripted plugin, I load the max file of the particular object, so every object of the same type will always have the same geometry. I am using a simpleObject for this:
on buildMesh do
(
file = scriptsPath + "\objects\tree.max"
mergeMAXFile file #(tree) #select #MergeDups
s = selection[1]
setMesh mesh s.mesh
delete s
) --end buildMesh
First problem is, it doesn't copy the material to the new object, so it starts with just a plain color.
The second problem is that when I create a second object, it removes the first one. So I can only create one object in a row. If I deselect the first object and try again, it works.
This is my approach, I donīt know if there is a better one, or maybe some tutorials on how to create a level editor using max..
Thanks..
My approach is to create every object in a separate max file. Then when creating the level using an scripted plugin, I load the max file of the particular object, so every object of the same type will always have the same geometry. I am using a simpleObject for this:
on buildMesh do
(
file = scriptsPath + "\objects\tree.max"
mergeMAXFile file #(tree) #select #MergeDups
s = selection[1]
setMesh mesh s.mesh
delete s
) --end buildMesh
First problem is, it doesn't copy the material to the new object, so it starts with just a plain color.
The second problem is that when I create a second object, it removes the first one. So I can only create one object in a row. If I deselect the first object and try again, it works.
This is my approach, I donīt know if there is a better one, or maybe some tutorials on how to create a level editor using max..
Thanks..
