Jump to content

random position?


Brian Cassil
 Share

Recommended Posts

Select all the objects you want to randomize.

Open MAXScript Listener and type:

for i in selection do i.position += random [0,0,-20] [0,0,20]

 

This will randomize the objects in the selection 20 units up or down in Z.

 

Same can be used for rotation (I do it all the time with RPCs):

for i in selection do i.rotation.z_Rotation = random 0.0 360.0

 

Hope it helps,

Link to comment
Share on other sites

Select all the objects you want to randomize.

Open MAXScript Listener and type:

for i in selection do i.position += random [0,0,-20] [0,0,20]

This will randomize the objects in the selection 20 units up or down in Z.

Same can be used for rotation (I do it all the time with RPCs):

for i in selection do i.rotation.z_Rotation = random 0.0 360.0

Hope it helps,

 

wow cool! are there more simple but effective tutorials like this? i was always afraid of maxscript, but it seems to be quite friendly :)

Link to comment
Share on other sites

I have a few on my website. THere are a dozen on ScriptSpot.com and also several mini tutorials in the MAXScript Help.

 

Unfortunately, my AU class on MAXScript was not accepted - I think it doesn't draw many users to it.

 

Always glad to be of service,

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...