Jump to content

Changing rectangles of terrain?

Recommended Posts

Not directly no, since it can be done using more primitive operations, namely changing one space at a time. You'll want code something like this:


//in the 'variables' section of the script:int i,j;//within some state of the script:i = [minimum x coordinate];while(i <= [maximum x coordinate]){	j = [minimum y coordinate];	while(j <= [maximum y coordinate]){		set_terrain(i,j,[new terrain number]);		j = j + 1;	}	i = i + 1;}

Where you will need to replace all of the phrases in brackets with the appropriate numbers for the position and dimension of the rectangle you want and the number of the terrain you want the script to draw.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...