Sign in to follow this  
Chase

Natural Building Scripts (Spawn random objects, scale and rotate randomly)

Recommended Posts

This macro will spawn a random object:

/run objects={505108,505106,502714,502716,502717,502718,502719};SendChatMessage(".go add "..objects[math.random(#objects)])

The object ids are comma separated inside the objects table. (In the left and right curly brackets)

 

This macro will randomly scale your target object 1.0 to 1.5:

/run SendChatMessage(".ro scale target "..math.random(10, 15)/10)

Because 10/10 = 1, and 15/10 = 1.5, you can get more decimals by changing them to 100, 150, and deviding by 100. And so on..

This macro will randomly rotate your target object from 0 to 360 degrees:

/run SendChatMessage(".ro degree target "..math.random(0,360))

We can combine these scripts to spawn a random object, scale it randomly, and rotate it randomly, all in one macro using the "last" selector:

/run objects={505108,505106,502714,502716,502717,502718,502719};SendChatMessage(".gob add "..objects[math.random(#objects)])
/run SendChatMessage(".ro scale last "..math.random(10, 15)/10)
/run SendChatMessage(".ro degree last "..math.random(0,360))

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.