Advertisement Jump to content
Sign in to follow this  

Level Editor with 3ds Max

This topic is 5189 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, Ive read some Max Script tutorials, and I can do things like create shapes and play around with them, also I am familiar with 3ds Max but what I want to do is to be able to export dummy objects like "Game Triggers" or "Light" or "Spawn Points" and export stuff like their position and special attributes into a text file I can make for my level. Is there any way to do this using just 3ds max script? Or would I have to dwell into the Max SDK? Im just exporting position and custom attributes of dummy objects.

Share this post

Link to post
Share on other sites
If you export as a .ASE file, you will get an ASCII-version of your scene, including lights, shapes etc. Fairly simple to parse. I don't know any maxscript, but I guess you can do it from that.


Share this post

Link to post
Share on other sites
Yes maxscript support file input/output.

As Trond said - it might be worth using the .ASE file format, then you can just place dummy nodes in the world and edit the node's name for special items, such as "Spawn_1", etc...

Share this post

Link to post
Share on other sites
I've only used maxscript to export materials, lights and geometry, but the maxscript reference is very helpful and easy to read.

There are several ways about encoding extra information into objects. You don't have to use the SDK. Using maxscript alone will be easier and faster.

Identify by texture, for instance, all guns have a certian gun texture applied. When the
Pros, if it has geometry, eg, weapon, character, etc. you can display it as it would look ingame.
Cons, fairly limiting, max has a material limit of 1024(I'm pretty sure)

Identify by name. Since two objects can have the same name, you could just name things whoat you want them to be.
Pros, display it as is.
Cons, limited ammount of information can be stored. I'm sur theres a name length limit.

Identify by User Defined Properties.
By rightclinking on an object and choosing Propertiesm, a properties dialouge will showup, click the User Defined tab and theres a blank editbox.
Here you can add whatever properties you'ld like.
I've never used these myself, but the maxscript reference says that you can enter plain keys, or key=value
<key1> = <property1>
<key2> = <property2>

you can access this information in maxscript by using the node methods: node.method

-getUserProp <node> <key_string>

retrieves the node’s user property with the given key as a string. <key_string> is either a String or a Name value. If the key does not exist, a value of undefined is returned.

-setUserProp <node> <key_string> <value>

sets the node’s user property with the given key to the given value

You would use it something like this:
print (getUserProp <selectionset>[n] <key>)

eg: print(getUserProp helpers[1] "key")
or WriteString file (getUserProp helpers[1] "key")

UserProperties seems like the best way to go in this case. In fact, it was probably designed to to just this sort of thing.

You can apply a user defined property to just about any kind of object in max.

Pros: can store any kind of information you want in the keys, easy to access with maxscript.

Cons:Unfortunatly, its not possible to tell what properties an object has just by looking at it.
I'm sure you could write a little script that would work as a sidebar and have an edit box to give instant access to all the properties of an object.

You can probably get away without using anything but maxscript for all of your editing needs. Using the SDK would be very powerful, but the easy and speed of maxscript give it a huge advantage over the problems that could arise in creating a plugin.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!