Garrulous Glaahk Handyman Posted July 3, 2010 Share Posted July 3, 2010 Hello, Is there any way to change a whole rectangle of terrain? I want to change it during the scenario and not in the editor, if that helps. Thanks! Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Niemand Posted July 4, 2010 Share Posted July 4, 2010 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: Code: //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. Quote Link to comment Share on other sites More sharing options...
Garrulous Glaahk Handyman Posted July 4, 2010 Author Share Posted July 4, 2010 Thank you! This is exactly what I was looking for. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.