GunHero

GunHero

Not enough ratings
Level Editor Introduction
By Tyyppi_77
This is an introductory guide to using the GunHero Level Editor to make your own levels to the Steam Workshop.
   
Award
Favorite
Favorited
Unfavorite
Introduction
GunHero supports Steam Workshop, which means that players can make their own levels using the in-game level-editor, upload those levels to the workshop, and play levels created by other users. There is also an in-game browser for finding new and interesting levels to play!

This guide will teach you the basics of the Steam Workshop system in GunHero. You’ll learn the basics of the level editor and how the submitting process works.
Open The Level Editor
First, you need to get to the level editor. This is easy, just press the button saying “Level Editor” in the main menu.

Create A New Level
Next, you’ll want to create a new level. Click the “New”-button in the top-left corner of your screen. That will open up a dialog that lets you enter in a name for the level, set the size of the level and choose the appearance of the level. Note that all of these can be changed later on, but your level will always be displayed with the initial name when opening a level from the editor. After you’ve entered the initial settings, click “Create Level”, and you’ll have a level to edit.

Terrain Editing Basics
You can use WASD or the arrow keys to move the player in the level editor. The player acts as your camera controls in the level editor. You won’t have to worry about him dying, he’s invulnerable and can pass through anything. To help guide your movement in the editor, I suggest turning on grid rendering either by pressing G on your keyboard, or checking the box in the lower-left corner of your screen.

Now, let’s add some terrain to our level. To do this, select a terrain brush from the listbox on the second row of elements at the top. For a solid ground, the terrains with the text “Foreground” will do (there are other solids too). I have chosen the “Canyon Foreground” brush. Use the left mouse button to place tiles, and the right mouse button to erase tiles. You can hold shift, press the left or right button to place or erase respectively, and drag your mouse around to fill or erase a rectangular area at once. If you make a mistake, you can press Ctrl-Z to undo.



Just like when writing something, it’s a good idea to save often. You can do this by clicking the “Save” button at the top of your screen or by pressing Ctrl-S.

While we’re at it, let’s add some background terrain too. These tiles aren’t solid, they’re just for decoration. I chose the brush “Canyon Background”. Here’s what I ended up with:



Next let’s add something that has variation values for you to choose. Select the “Scaffolding” brush from the terrain listbox. If you paint with it, you’ll see that it creates two tiles wide scaffolding. Now, you can either use your scroll wheel, or use the minus and plus buttons at the right side of the UI elements at the top to change the variation value of a brush. Not all brushes have variations, but this scaffolding just so happens to have them! Actually, the brushes that have a star (*) at the end of the name support variations. At value 1, it paints thinner scaffolding, and at values 2 and 3 it paints canyon-style plank supports. I painted some wide scaffolding and some plank supports.



Now that we have some nice terrain going on, let’s make our level actually playable!

Entity Basics
Entities are objects that do something in the game. Good examples of entities are the enemies and obstacles in the game. Now, there are two things that every level has to have: a spawn point and an exit. Let’s add a spawn point.

Select the “Player Spawn” entity from the listbox on the right side of the terrain list box. Just like with terrains, left mouse button places and right mouse button erases. Each spawn point spawns one player, so if you want your level to be playable by more than one player, I suggest adding up to 4 spawns next to each other.



Entities can have properties. If you hold spacebar and click on an entity while you have an entity brush selected, a dialog will open. The click needs to happen on the top and left-most tile position of the entity, so in the case of the player spawn, on the top half of the entity. Let’s make this a level where the player doesn’t have a gun when he spawns in, so I check the checkbox in the dialog that says “Spawn Weaponless”.



Repeat this for all the spawns you’ve added. Oh, and you can move dialogs around by dragging them from their background panel.

But what was that mysterious “Entity Tag” text field? Good question.
Entity Tags
Entity tags are a way for entities to communicate with each other. The most useful application for this are door systems, so let’s make one of those.

Add in a “Door Prison” or “Door Bunker” somewhere in the level. Also add in a “Switch Pressure” so that we can unlock the door. Now, select the door you added just like you selected a player spawn, and enter a name in the text field.



Next up, select the switch you placed, and enter the name you gave to the door in the “Reference Tag” field in the switch’s property dialog.



Now that the switch and the door are linked up, the door will be locked when a player spawns in the level. By default doors aren’t locked.

If you didn’t already, now would be a good time to save the level.

Okay, so now we have player spawns and a door system. Now we need to add an exit. There are two types of exits a level can have: a truck or a trigger exit. A truck is an entity, which can be placed just like other entities. You already know how to do that, so let’s add a trigger exit to this level.
Triggers
Triggers are special rectangular areas marked inside a level. To enter trigger editing mode, click the “Edit Triggers” button at the top of the screen.

Now, decide where you want your level to end. To place a trigger, press the left mouse button to start placing a trigger. As you move your mouse a preview of the trigger area will be rendered. Press the left mouse button again when the area is what you want it to be. A trigger property dialog will open.

For the game to consider the trigger a level exit, the trigger needs to be named “TriggerLevelFinish”.



Now our level has a spawn and an exit which means that we can test it! Save your level, and let’s try this bad boy out!
Testing
You can test your level anytime during editing, even before placing spawns and the exit, but the level is obviously not completable yet. Also, note that if you test before placing a spawn down yourself, a spawn will be added to the top-left corner of the level, which you’ll need to manually remove if you want the player to spawn somewhere else.

Anyways, to enter testing mode, you can press F4 or click the “Test” button. Dying will instantly respawn you at the start of the level. If you want to hide the distracting level editor UI, you can do that by pressing H. Pressing H again reshows the UI. Pressing F4 again or clicking the “Edit” button will stop testing and move you back to editing. Completing the level also stops the testing mode.

Now, play through your level, and then we can move onto publishing!
Publishing
To publish your level to the world, click the “Publish” button. A dialog will open. The dialog displays you the preview image of your level. If you want to change where this is taken, you can place down a “Thumbnail Marker” entity which marks the center of the thumbnail. By default the thumbnail is captured where you last saved the level.

The first listbox in the dialog lets you choose between uploading a totally new level, or updating an existing one (useful if there’s a bug in the level design you discover or something else). We can leave that unchanged.

You can change the name of the level if you want, however that is not required. You can also add a description for your level, but that is not mandatory. Finally you can choose the type of the level. The types are pretty self-descriptive, a battle arena will start in a special battle-arena mode, and requires exactly four player spawns to exist. We can leave this at “Level”.

To release your works to the world, press the “Publish” button at the bottom of the dialog.



A dialog displaying the upload progress will appear. Once it’s done, your level will be available for all world to play!
Closing Words
Now you know the editor basics. This editor is what the actual game campaign is created with, so you have a lot of possibilities, so go out there and experiment with different entities, terrains and obstacles! Do note that a few things have been left out of the public editor, mainly due to instability issues and the fact that these are not very critical features: trigger actions (used once or twice in the game campaign) and cutscenes.

At the end of this guide there are a few details plus tips and tricks that might help you get more productive with the editor. If you have questions or suggestions about the editor or the workshop integration in general, don’t hesitate to ask on the game’s discussions page.

Happy level creating!
Hotkeys
New
F1
Open
F2
Save
F3, Ctrl-S
Test/Edit
F4
Toggle Render Grid
g
Toggle Render Triggers
t
Edit Properties
e
Undo
Ctrl-Z
Redo
Ctrl-Y
Toggle Render UI
h
Select Entity
Space + Left Mouse (In entity editing)
Select Trigger
Space + Left Mouse (In trigger editing)
Next Brush
Ctrl-D
Previous Brush
Ctrl-A
Delete Selected Trigger
Delete (In trigger editing)
Move Trigger
Shift + Drag (In trigger editing)
Tips & Tricks
Here are some various details that you might find helpful:
  • A fun use for triggers are damage areas. Just name your trigger “TriggerDamage”, and it will damage the player when he walks into the area.
  • Triggers can also be used to control moving platforms. Just place triggers named "TriggerPlatformStop", and moving platforms will bounce from the triggers.
  • It’s super hard to guess what size of your level will be when creating a level, so the level resize functionality in the “Edit Properties” dialog will probably become helpful. Use the offset sliders to move the top-left corner of the old-sized level. For an example, if you make the level larger and keep the offset at 0,0, the level will be expanded on the bottom and right side. An offset of 2, 0 will add two tiles on the left side, and rest on the right side. Bottom will be expanded like previously.