June 30 2024 build: Difference between revisions

From Skyscraper Wiki
Jump to navigation Jump to search
No edit summary
 
(6 intermediate revisions by 2 users not shown)
Line 2: Line 2:
This build has a new script interpreter feature, For loops.  This is something that will be very useful to building creators, since it'll allow you to automate tasks more easily, such as creating hundreds of doors.  I'll explain how it works from the script guide too.
This build has a new script interpreter feature, For loops.  This is something that will be very useful to building creators, since it'll allow you to automate tasks more easily, such as creating hundreds of doors.  I'll explain how it works from the script guide too.


This is the new content in the script guide (designguide.html):
This is the new content in the [[Help:Design Guide#For Loops|script guide]] (designguide.html):


----
----


9. For loops
'''9. For loops'''


For loops can be created by specifying an iterator variable, and the range to use, with the following syntax:<br>
For loops can be created by specifying an iterator variable, and the range to use, with the following syntax:<br>
<code><For iterator start To end><br>
<code><For iterator start To end><br>
(code)<br>
''(code)''<br>
<EndFor></code>
<EndFor></code>


Line 32: Line 32:
         Print %i% : %j%<br>
         Print %i% : %j%<br>
     <EndFor><br>
     <EndFor><br>
<EndFor>
<EndFor></code>


When the code is run, this is the result:
When the code is run, this is the result:
Line 49: Line 49:
3 : 4</code>
3 : 4</code>


----</code>
----


'''Changelog:'''
'''Changelog:'''
Line 75: Line 75:


* [[June 23 2024 build|Previous build]]  
* [[June 23 2024 build|Previous build]]  
* Next build
* [[July 6 2024 build|Next build]]
* [[Development Builds]]
* [[Development Builds]]


== External links ==
== External links ==
* [https://skyscrapersimulatorforum.createaforum.com/download-skyscraper-simulator/new-build-63024-build/ New build: 6/30/24 build on the Skyscraper Simulator Forum]
* [https://skyscrapersimulatorforum.createaforum.com/download-skyscraper-simulator/new-build-63024-build/ Build: 6/30/24 build on the Skyscraper Simulator Forum]


[[Category:Development Builds]]
[[Category:Development Builds]]
[[Category:2024 Builds]]
[[Category:Alpha 12 builds]]
[[Category:Alpha 12 builds]]

Latest revision as of 13:57, 1 September 2024

This article is legitimate.
It contains good-faith information, such as an existing building or content.
This article describes a development build of Skyscraper Simulator.
It contains good information related to Skyscraper Simulator.

This build has a new script interpreter feature, For loops. This is something that will be very useful to building creators, since it'll allow you to automate tasks more easily, such as creating hundreds of doors. I'll explain how it works from the script guide too.

This is the new content in the script guide (designguide.html):


9. For loops

For loops can be created by specifying an iterator variable, and the range to use, with the following syntax:
<For iterator start To end>
(code)
<EndFor>

The For loop will loop until it completes the "end" value, and can iterate up or down. The value of the iteration is stored in the iterator variable and the variable name must be unique. In the following example, the iterator variable will be printed out on each iteration:

<For i 1 to 3>

   Print %i%

<EndFor>

When the code is run, this is the result:

1
2
3

For loops can be nested, like this:

<For i 1 to 3>

   <For j 1 to 4>
Print %i% : %j%
<EndFor>

<EndFor>

When the code is run, this is the result:

1 : 1
1 : 2
1 : 3
1 : 4
2 : 1
2 : 2
2 : 3
2 : 4
3 : 1
3 : 2
3 : 3
3 : 4


Changelog:

  1. added support for For loops
  2. added documentation for the new For loops

Some more complex For loop examples:

<Floors 0 to 3>

   <For i 1 to 10>
<For j 1 to 10>
Print %floor% : %i% : %j%
<EndFor>
<EndFor>

<EndFloors>

<For i 1 to 10>

   <Floors 0 to 3>
Print %i% : %floor%
<EndFloors>

<EndFor>

See also[edit | edit source]

External links[edit | edit source]