This topic was published by Jarret Buse and viewed 1254 times since "". The last page revision was "".
- Topics - 25
We have covered the Badguys, but now we need to go over the other objects available for use in Supertux.
Let's start at the beginning of the previous list.
A full picture can be used as the background for your level. By using the Background object, you can specify the image to use. When you place the Background Object on your map a new layer is created called "Background IMG (-200)". Highlight the Background IMG Layer and then look at the Properties. There are listed three image placements:
Use "Image", basically the middle image, as your main graphic. The "Imagetop" can be used to be placed above the "Image", such as clouds. "Imagebottom" is placed below the "Image".
Some versions of Supertux Level Editor have issues with choosing the image. You can browse for it with a file manager and type it in manually to make it work. The format is "images/background/<image_name.ext>". For example, I could use an image of fog (fog.png) and type in "images/background/fog.png".
To remove the Background Object, right-click on "Background IMG (-200)" in the Layer List and select "Delete".
Another use for the background is a gradient. A gradient is a slow change of color from one to another. When placing the Gradient Object, there will be created a Layer called "Gradient (-200)". Select "Gradient" in the Layer List and under Properties, select your top and bottom colors. It is suggested not to change the Layer number from -200.
Stalactites hang from the ceiling or the top of the map area. As Tux gets close to them, they will fall. After they hit something, they will reappear where they had originally been placed. Now, the can fall again when Tux gets close. Tux cannot touch them or he dies. If you have an span for Tux to jump over, make sure he has enough room so he does not jump into the Stalactites.
The Decal is similar to the Background, but it is an image which takes up only the space of the image being used. For example, an image of a castle front can be placed onto a level.
The Spawn Point is where Tux begins the Level. It is called "main" and should remain "main". Other Spawn Points can be added, read about Doors further down.
The Reset Point looks like a bell. When Tux reaches this point and dies after, her restarts at the Reset Point and not the Spawn Point.
The Door is wonderful object to allow Tux to move around the level. A Door is placed where you need it. When Tux get in front of the door, the player uses the Up arrow to enter the door. When you place a door, the Properties must be set. The Sector is the name of the Sector to which the Door leads. For now, this should be "main". The Spawn Point is the name of a Spawn Point placed elsewhere on the level. If other Sectors are made, then you can send Tux elsewhere.
A spotlight is a spinning device with a spotlight shining out of each end. The color of the light can be set under "color".
Magic Blocks are like typical unbreakable blocks, but they have a color. The color of the block is set in the block's Properties. If there is a light source with the color in it to match the block, the block is solid. If the color of the block is not present, the block will not be solid. Of course, white light will cause all blocks to be solid.
NOTE: See the two included levels: "bridge.stl" and "The Dark.stl".
A Lantern is an object which Tux can carry as long as the Action key is held down. When a Lantern is placed on the map, the color of the Lantern can be set to a specific color. The color can be useful when used with Magic Blocks.
A Candle is similar in nature as a Lantern, but not as bright. The candle is not movable like a Lantern. The Candle flame color can be set in the Properties as well as if the Candle is burning or flickering.
The Switch can be used to cause a Script to be run when the Switch is activated.
A Push Button also controls a Script when the button is pressed.
To detect when Tux is in a certain place to have something happen, use an iSpy. The iSpy is a camera which can detect when Tux passes and then a script is executed. The script can close/open doors, etc.
The Trampoline object is used to allow Tux to jump on to jump higher than normal. Under the Properties, the Trampoline can be set to be Portable. If the Trampoline is Portable, then Tux can pick it up and place it where it is needed.
A Rock object is a solid block on which Tux can stand. The Rock is Portable and can be moved by Tux which multiple Rocks can be stacked as needed.
The Hurting Platform is a device which looks like a saw. If Tux touches it, he dies. The Properties for the Hurting Platform allow you to turn it on/off. The Hurting Platform can be set to move along a path using the Path Tool.
Unstable Tiles are tiles which will crumble when Tux steps on them. Badguys do not cause the blocks to crumble.
The Weak Blocks are burnable when Tux has Fireball Power. Under Properties for the Weak Block, you can check "Linked" which makes the block look look a bale of hay and will burn blocks next to it when it burns. If the Link block is not checked, the Weak Block is a block of ice which melts when hit with a fireball. These blocks can also be destroyed by a nearby exploding bomb.
The Bonus Block allows you to gain something from the block. By default, it is a coin. The Properties show a field called "HitCounter" which lets you specify how many coins. The "Content" is set to "coin", but can be one of the following:
- coin – coin emerges
- firegrow – if Tux is large, a Fireflower emerges. If Tux is small, an egg emerges
- icegrow - if Tux is large, a Iceflower emerges. If Tux is small, an egg emerges
- 1up – Tux Doll emerges to give an extra life
- star – star emerges to make Tux invincible
The Info Block lets you place a message in the Properties which will appear when Tux hits the block. This is a goo method to give information to the player.
The PowerUp object allows you to set a specific PowerUp item where you want it without it being in a block. To change it, specify the sprite in the SpriteFile option under Properties. If Tux is not large, after getting an egg, and Ice Flower or Fire Flower has no effect. The possible options are:
- Ice Flower – images/powerups/iceflower/iceflower.sprite
- Fire Flower – images/powerups/fireflower/fireflower.sprite
- Tux Doll (1Up) – images/powerups/1up/1up.sprite
- Egg – images/powerups/egg/egg.sprite
- Star – images/powerups/star/star.sprite
There is a checkbox for the PowerUp Properties called "DisablePhysics". If the box is checked, then you can place the PowerUp in the air and not on a block or on the ground.
The Ambient Sound Object is used to play a specific sound file when Tux is in a marked area. When the area is marked, the area needs to be quite large. Under "Sample:", enter a sound file as "music/file.music" or "sounds/file.ogg". Here, "file" is the filename of the audio file to play (ogg can also be wav or anything supported). The "DistanceFactor" is good set at ".1". "DistanceBias" is good at "200" and "Volume" as "200". If the AmbientSound does not work properly, make the area larger until it works. A "Name" can be set to manage it with scripts.
The Invisible Wall is literally an invisible wall which the player cannot see. Be aware that Tux can jump onto the top of the wall if it is low enough. Tux can also walk on it as if it were a real wall. Particles, discussed a little lower, will pass though the invisible wall so the player cannot tell that it exists.
The Secret Area is left blank in the Interactive Layer. Once done, create a new layer and cover the Secret Area with blocks with the newly created layer selected. Click the eye next to the new layer twice to turn it invisible. Click on Objects and the select the Secret Area block. Cover the whole are you created. Under the Properties for Secret Area, you can enter the new layer name in the FadeTilemap line. A Message can also be made to appear when the Secret Area is found, or use the default. The FadeTilemap causes all blocks on the layer you created to fade out so the player can see the whole Secret Area.
The Rain Particles object creates a new layer where rain falls. The layer can be moved by layer number. The area is for the whole sector. The layer number can be changed and will "disappear" if the rain layer is placed behind other layers.
The Ghost Particles Object is the same as the Rain Particles Object except that it appears as ghosts are moving around the screen. Be careful to place the Layer numbers accordingly so the ghosts can appear in front of other layers if needed.
The Snow Particles work like the other Particle Objects. In this case snow falls.
The Cloud Particles Object will display clouds in the layer. It works like other Particles Objects.
The Thunderstorm Particles Object provides thunder and lightning in the background. Under the Properties for the Thunderstorm layer, the Interval is used to set the number of seconds between the thunder and lightning to happen continuously. A script can be used to control the Thunderstorm by setting a name (covered in another article). Again the layer can be set to control where the lightning is seen. A checkbox labeled "Running" allows you to enable or disable it (also done by the script if needed).
This should cover all of the standard objects in SuperTux. Be sure to play with the objects and learn them well. Look at the included worlds, especially "World1" and "World2" for examples of object usage. If need be, go to the directory for the world in a terminal and use the command "grep object *". Here, object is the name of the object you are look for in the files. If a match is found, a list of the files containing the object is displayed. Be sure you are using the proper object name. For example, "ambientsound" is in the file as "ambient_sound". Some names use underscores (_), others use dashes (-) and some just run the names together. To help find the object, go to http://supertux.lethargik.org/development/doxygen/html/files.html and perform a search for the object. The name should be listed with an extension of ".cpp". The web site shows the actual C++ code for the object you choose.
- Supertux Level Editor Articles (List) - http://dcjtech.info/topic/gaming
Attachments:You must be logged in to view attached files.