Porthole Level Editing Guide
Note: This needs to be updated to work with the latest version. This guide predates the existence of the companion cube and the turret.
Open up the Sandbox room in the editor. For starters, you should know about all of the characters involved in the room, listed in movement order. Maintaining this movement order is important!
Characters:
Click here to view the secret text
×Circle of eight: These are in the upper-right corner of the Sandbox, though their location doesn't matter otherwise in user-created rooms. They do however need to be in that circle with Beethro in the center to function properly. They respond to being bumped by Beethro and set a variable recording the direction you moved.
Player Character: This character appears in the lower-left of the sandbox. It appears as a Mud Coordinator. Its location is where it will start in the room.
Blue and Orange Portholes: These are found at (1,0) and (2,0). Their starting location does not matter.
Character in (0,0): This character sets Beethro's sword to off (purely cosmetic) and then will check for the exit condition. Movement order should be some point after Player Character.
Other: Top center. Speech characters. Unnecessary.
Optional changes:
Click here to view the secret text
×The Player Character has two variables you might be interested in.
The first is called JumpHeight, which is defaulted to 1. The line that sets JumpHeight is at the top of the Player Character script. Try setting it to 2 to see how it affects your play.
The second is called TerminalVelocity. It can also be found at the top of the Player Character script. This is the maximum vertical momentum you can build, and as such, affects how high you can be launched out of portholes after gaining that momentum. It defaults to 10. Set it higher to launch higher.
Exit conditions:
Click here to view the secret text
×The only actual scripting you'll have to do is writing the script to determine your exit conditions. And I've made that easy for you. The character at (0,0) should have the following code:
Click here to view the secret text
× Set player sword Off
Label Loop
Wait 0
If ...
Wait until var "PlayerX" = XXX
If ...
Wait until var "PlayerY" = YYY
***GO TO LEVEL ENTRANCE***
If End
If End
Go to Loop
Simply replace "
XXX"
with the x-coordinate of the room exit and "
YYY"
with the y-coordinate of the room exit. Then choose the level entrance you'd like to go to, as shown by the asterisks.
Design Considerations:
Click here to view the secret text
×Doubling up on pits provides a workable method for "no-porthole" locations. Also try experimenting with hot tiles for a similar effect. Due to the scripting, the player character dies immediately upon stepping on a hot tile.
____________________________
http://beepsandbloops.wordpress.com/
[Last edited by RoboBob3000 at 02-11-2008 03:27 PM]