Necrogiant
Ultragamer July - 11 - 2010 Articles, News5 COMMENTS

Hello and welcome to PainEditor Basics tutorial (singleplayer levels). It will teach you about the PainEditor interface, what the buttons do, the counter system, and other things.

1. The Interface

To the bottom right, by default there is three tabs.

One is Game Objects, which list all entities such as enemies or checkpoints in the map. It will categorize the entities by their type.

Another is Templates, which list all the available templates to spawn. Templates are objects with preset settings, so if you wanted to make a bunch of fast enemies and don’t feel like editing, for example – the run speeds on every single default one, you can just change the run speed on the default enemy, then save it as a template. Now you can spawn it from the templates tab instead of spawning and editing every single default one Laugh.

The last is Entities. You can’t do anything here really but right click them and click Look at to see where they are. These entities are the map’s meshes and lights and various other things created in whatever modeling software was used to make them.

Pain Editor tutorial

2. The Buttons

I will only describe the interesting ones from left to right, on the top row. (Don’t worry about the second row, it’s only for walkmap stuff which is only needed for new .mpk’s and I don’t even know what they do anyways).

  • Purple-ish cube with reticule thingy to upper left = This creates a new, blank, plain object. Good for if you want to create an object possibly not in templates by specifying the name in the Base Object option.

    Pain Editor tutorial

  • Small red box with arrow going over it = This resets the currently selected object. Resetting the object sets it’s position and settings to the last saved position and settings. Handy if you just accidentally moved an object out of some perfect alingment you set it in or messed up the settings/properties and don’t want to do it again. Or you could just close the level/click the Reload Level Objects button. That works too (but is a little more time-consuming).

    Pain Editor tutorial

  • Yellow and green speckles (button location around the middle of the row) = Toggle showing areas, so you can visually see them to help you know their size when your editing the size. Areas are the .CBox entities.

    Pain Editor tutorial

  • Red box with lightning icon in it = Launch gamemode, which starts the level, switches fullscreen, and switches to player mode. A real all-in-one button.

    Pain Editor tutorial

  • Play/arrow button = Turns on all lua scripts essentially starting the level. Press the F key to go to player mode and you will have weapons and monsters will work.

    Pain Editor tutorial

  • Back button with “L” = Reloads all level objects. If you killed some monsters or picked up some ammo or anything, this puts them back. It just refreshes everything.

    Pain Editor tutorial

3. Making A Map

First, click File > Extract Game Data. This extracts the maps (.mpk’s), levels, and textures. You need the .mpk’s.

Pain Editor tutorial

Click OK.

Pain Editor tutorial

Wait a few minutes.

Pain Editor tutorial

If you want to edit an existing level with existing entities, you could copy the level’s folder, rename it, rename the (levelname).lua and (levelname).CLevel files to the new name, open (newlevelname).lua and on the function (levelname):OnPlay() part change (levelname) to (newlevelname). Then open the level in PainEditor and edit.

If you want to “clear” an existing level/map, follow these steps.

  • Click File > New Project

    Pain Editor tutorial

  • Enter the name of your level and click OK.

    Pain Editor tutorial

  • Click the Reload Game Objects button (this reloads the level to enable the map option in the level properties).
  • Open the level’s properties under the Game Objects tab (double click on name of your level or click right key of mouse & select Properties).

    Pain Editor tutorial

  • Click inside the blank space beside the “map” option, then click the “…” button.

    Pain Editor tutorial

  • Navigate to the Maps folder if your not already in there, and choose the .mpk you want.

    Pain Editor tutorial

  • Back at the level properties, click inside the blank space beside the WayPointsMap option and click the “…” button.
  • Navigate to the Maps folder if your not already in there and choose the .wps with the same name as the .mpk you chose.

    Pain Editor tutorial

Next load up the original level and see the value for the Scale option in the level properties.

Pain Editor tutorial

Change the scale option value in your new blanked level to this value. This correctly sets the scale of the level so you can walk and will have collision in the level.

Pain Editor tutorial

Now you can start placing entities in your level.

4. The Counter System

I will now explain the counter system. The entities I know of that use the counter system are checkpoints and slabs.

Now you will learn in conjunction with an AmbushForPlayer.CBox and MonsterSpawnPoint.CSpawnPoint how to enable a checkpoint after you kill five monsters.

  • To move on map use default keys W, S, A & D and pressing right mousebutton to change the direction, so you can fly on the map like a spectator in multiplayer. Open the Templates tab and spawn an AmbushForPlayer.CBox, MonsterSpawnPoint.CSpawnPoint, and a CheckPoint.CItem under the GamePlay folder in the map.

    Pain Editor tutorial

  • Go ahead and click the Edit Areas button if you want to see the AmbushForPlayer.CBox and MonsterSpawnPoint.CSpawnPoint. Open the properties of the AmbushForPlayer.CBox and under Actions > OnTouch click in the empty space beside <new> and enter – Launch:CheckPoint_001, 5.

    Pain Editor tutorial

    Pain Editor tutorial

The syntax for the Launch action is this – Launch:<object name>, <monsters to kill until launch>. Now after you have killed the amount of monsters specified, the Launch action is executed. Go into the properties of the CheckPoint.CItem and change the Frozen option from false to true.

Pain Editor tutorial

Pain Editor tutorial

This hides and disables the checkpoint until Launch is called on it. Now let’s commence the final steps.

  • Open the properties of the AmbushForPlayer.CBox and under ToLaunch click in the blank space beside <new> and click the arrow and choose your MonsterSpawnPoint.

    Pain Editor tutorial

    Pain Editor tutorial

  • Open the properties of the MonsterSpawnPoint.CSpawnPoint and click the space near SpawnTemplate and click the arrow to choose the monster to spawn if you want. Devilmonks are the default. The default amount of monsters to spawn (GroupCount) is five, you don’t need to change it.

    Pain Editor tutorial

    Pain Editor tutorial

5. Finalization

Now navigate in fly mode to where you would want the player to first start at in the map. Press the f key to switch to walk mode to get at the right height above the floor. Press the f key again to go back in fly mode to get your mouse back, then click click File > Save Level and Objects to save everything and your position.

Go ahead and click the Launch Gamemode button to start the game. Touch the AmbushForPlayer.CBox. Monsters will spawn. After you kill five, the checkpoint will activate.

I hope you guys found this tutorial helpful.

Have fun!

  • greentechb

    very very helpful :D thanks for it ;)

  • MATFUCKINGRICHARDS

    i came

  • T0rmentoRrr

    How can I close door after some monsters killed ? If i use Close:Slab_001, 8… it close it from the beginning and opens after 8 guys dead. i want a certain door to be opened until i kill 8 guys and then close it after they die..can it be done..

    • Phantom

      Hey! Well it’s actually quite easy.. Yes the “Close:Slab_001,8 “keeps the slab CLOSED until 8 monsters are killed and not OPEN ..therefore it does not help.

      But you can place your door and leave the “Closed” parameter to “false”. Then you can use the AmbushForPlayer FIRST to launch the monster spawners, THEN add the “WaitForCorpses: 8 ” command and then add “Close:Slab_001,999″.

      “WaitForCorpses: 8″ postpones ANY command that is written AFTER it.. until 8 monsters are killed. Then by adding the “Close:Slab_001,999″ you simply close the door. You will notice the Slab_001 will remain open until the 8 monsters are killed.

      • T0rmentoRrr

        Thank you for the help. I am new to this paineditor thing but I loved the original so much, I want to know it even more..behind the scenes lol.

Categories

Painkiller is a first-person shooter game released on April 12, 2004. The game takes place in Purgatory and Hell. The main character is Daniel Garner.