![]() NOTE: When switching Sectors, be aware that the screen needs to be cleared to so no residual graphics are left. If the line is removed, the Sector called "NextSection" will be shown and the Sector "main" will be visible in the background. The value sent to the effect is "true" to make the screen black. The spawning is followed by an Effect where the screen is set to black. Here, the spawn is to the Sector named "NextSection" and the Spawn Point named "NS1". SUPERTUX 2 CODEThe code here is to spawn Tux to a Spawn-Point called "mainunder" on the Sector "main". The button has the following script code: ![]() So, how do we handle so many Spawn-Points? On the top level of the Sector "main" there is a button. The names can be whatever you may like, but try to leave the default Sector and Spawn-Point as "main". The second Sector has a spawn point called "NS1". A spawn-point is placed underground on the "main" Sector and it is called "mainunder". The initial spawning point is above ground on the "main" sector called "main" (also default so do not rename it). The second sector is named "NextSection". One sector, by default, is named "main" (usually leaving the name alone is best). Figure 2Īs you can see from the tabs, there are two sectors. You should see something similar to Figure 2. Take a look at the InitScript.stl file by opening it in the SuperTux 2 Level Editor. We will go over the initial event when the level starts and when Tux is transported to another spot in a Sector or to another Sector. ![]() Spawning is any event where Tux "appears" at a starting point. The scripts we are using for the spawning of Tux, we will deal with the spawning event. Tux is also spawned after he is killed and starts over again so be aware the InitScript will be performed again. NOTE: Technically, the script is run whenever Tux is spawned. Pressing the "Edit Script" button will allow you to manage a script when the level initializes. You can see the fourth line is for setting up an InitScript. To add a Sector, right-click on a tab or in the rectangular boxes, which contain the tabs, and select "New". The tab on the screen called "main" is one sector. NOTE: Each level (STL file) can be made up of many sectors. ![]() If you right-click on the "main" tab and select "Properties", you will be allowed to change the properties for the Sector. SUPERTUX 2 DOWNLOADIf music is set for the Ambient Sound, it will play while the script is running.įirst, let's look at a script placed into a level called " InitScript.stl" which will be available for download ( ). Be aware that the InitScript is run before any Bad Guys are enabled on the level. Many things could be placed into the InitScript. When a level starts, the InitScript is run. The first script we will cover is the Initialization Script (InitScript). Download both of these e-books and use them as a reference as we go through the scripts. The e-book " Squirrel 3.0 Reference Manual.epub" shows the Squirrel language and how it is used. The " SuperTux Scripting.epub" e-book shows the specific commands for SuperTux. NOTE: SuperTux v0.3.5 uses Squirrel v2.2.4 ![]() The first EPUB is " SuperTux Scripting.epub" and the second is " Squirrel 3.0 Reference Manual.epub". SUPERTUX 2 ANDROIDFor information on Squirrel, there will be two downloads available in an EPUB format which can be viewed on a Nook or an Android tablet using an E-Book Viewer. Super Tux uses a language called Squirrel. To get into scripting, the best way to learn is to jump right into the language. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |