Creating a Level: Difference between revisions

From Gothongs Wiki
Jump to navigationJump to search
Panda (talk | contribs)
No edit summary
Panda (talk | contribs)
No edit summary
Line 27: Line 27:


== Step 4: Adding the exit. ==
== Step 4: Adding the exit. ==
# Edit your exit door prim. Set the description to D$Exit$$LVIN$EXIT
# Note: D$Exit makes the prim interactive by pressing E, with the label "Exit". LVIN$EXIT raises a level interact event inside of _MAIN. The event task is set to "EXIT".
# The default _MAIN script comes with a default handling of LVIN$EXIT. But it also requires you to kill a monster with the ID "finalGoblin". So we will add that.
== Step 5: Adding monsters. ==

Revision as of 15:05, 10 April 2024

This is a tutorial that lets you create a very basic level with no scripted events. This level sets up a spawning spot, spawns monsters and adds an exit.

Step 1: Build your level

This is not something I can help much with. I am sure there are tutorials that teach you how to use the SL building tools. But here are a few suggestions:

Create a 10x10x0.5 prim as a base, and build everything 10m above it. It reduces the chance of you spawning the level on top of somebody. Here is a basic setup with a root prim "anchor" and a platform for players to walk on.

Build your level and make sure that the "anchor" remains the root prim by linking it last.

Step 2: Add the scripts

  1. Unpack your GoThongs Devkit that came with your GoThongs unpacker. Wear the devhud and unpack the level scripts.
  2. Drag _MAIN, got Level, all the slave scripts, Trigger and TriggerSensor into your level. Also wear your GoThongs HUD!
  3. Hold ctrl while you press enter after typing the following into chat (shout): debug got Level
  4. You will get a message saying "Updating level code..." and if you edit your level you will find that it has added additional scripts!

Step 3: Add a spawn point

  1. Click the Spawn button on your dev HUD. Then right click and sit on the P1 mesh that spawned.
  2. Edit yourself into a position where you want your players to start.
  3. Say "add" in chat to save your spawn point. You will get a message like "Saved start point at <-12.57,-10.92,10.92>".
  4. Warning: At this point you should not do drastic changes to your level. All spawn points and monsters are relative to the root prim. If you move the root prim relative to the level you have to redo all the spawn points and monsters.
Positioning yourself with P1

Step 4: Adding the exit.

  1. Edit your exit door prim. Set the description to D$Exit$$LVIN$EXIT
  2. Note: D$Exit makes the prim interactive by pressing E, with the label "Exit". LVIN$EXIT raises a level interact event inside of _MAIN. The event task is set to "EXIT".
  3. The default _MAIN script comes with a default handling of LVIN$EXIT. But it also requires you to kill a monster with the ID "finalGoblin". So we will add that.

Step 5: Adding monsters.