Mapping & SDK

KF SDK: Ambient Sounds, Snow, Teleporters and Sky Textures

Small KF SDK techniques explained on the killingfloor.ru forum by mappers Gaiver5, K-2 and UltraKill (2012-2013). Editor basics are covered in the mapping guide and map editor basics.

Ambient sounds (AmbientSound)

Rustling leaves, flies over a bin, birdsong, a humming vent: all of it is done with the AmbientSound actor.

  1. In the Actor Browser pick Actor - KeyPoint - AmbientSound.
  2. Right-click a surface in the map and choose Add AmbientSound Here.
  3. Open the Sound Browser, pick a package and a suitable sound.
  4. In the actor's properties, Sound - AmbientSound, press Use: the actor now plays the selected sound.
PropertyMeaning
SoundVolumeVolume, 0-256
SoundRadiusHow far around the actor it can be heard
SoundPitchPlayback speed (pitch): 32-128, default 64. Slowed-down sounds work great on horror maps
bFullVolumeWhen True, volume does not fall off with distance
SoundOcclusionHow walls muffle the sound: OCCLUSION_Default, OCCLUSION_None, OCCLUSION_BSP, OCCLUSION_StaticMeshes. If unsure, keep Default

For background sound in a large space (a forest, a street), place several actors with overlapping radii: as the player moves, one sound fades out while the next fades in.

Snow

  1. Add an xWeatherEffect actor to the map (easiest: copy it from an official winter map such as KF-Marylux).
  2. Set WeatherType = WT_Snow. Particle count, size and direction are set by the effect's other properties.
  3. To keep snow out of buildings, make an exclusion volume: stretch the red builder brush over the whole building, choose Volume on the toolbar and create a plain Volume. Note the new Volume is created separately from the brush; move the brush aside to see it.
  4. In the Volume's properties, Events tab, set Tag = NoSnow. The same tag must also be set in the xWeatherEffect actor's own properties, or the volume is ignored.
  5. Rebuild the map.

Fire and other particle effects (Emitter)

From K-2's answer in the "Добавление огня на карту" (Adding fire to a map) thread on the killingfloor.ru forum. The visible "fire" on maps is usually a Sprite Emitter (in the editor it looks like an emblem with "+" signs). It generates "flat" particles, normally with a semi-transparent texture, and has very fine settings: count, speed and trajectory, colour correction, lifetime and particle size range. One Emitter can combine several different effects at once.

There are three ways to add an Emitter to a map:

  1. Pick one of the existing ones in the Actor Class browser (Actors > Emitter) and add it via right-click > Add [name] here.
  2. Copy an Emitter from another map (Ctrl+C / Ctrl+V) and edit it if needed.
  3. Build one by hand, which is not that easy.

In the editor the Emitter effect is only visible in Realtime Preview mode. It is convenient to tune it that way, watching the result, instead of testing in the game over and over (K-2's advice in the "Создание Emitter'а" (Creating an Emitter) thread).

Teleporters

  1. In the Actor Browser open NavigationPoint and pick the type: KFTeleporter (regular) or KFTraderTeleporter (the trader teleporter).
  2. Right-click a spot in the map and choose Add KFTeleporter Here. Place two of them, for example at opposite ends of the map.
  3. On the second one (the exit), in properties, Events tab, set a Tag, for example TestTeleport1.
  4. On the first one (the entrance), Teleporter tab, enter that tag in the URL field.

The first teleporter sends players to the second by tag. Give the second one a URL with the first one's tag and it works both ways. Players and zeds can also be moved with triggers; see the triggers section of the mapping guide.

Sky textures

  • Red Sorceress (redsorceress.com/skybox.html): many themed sky sets, 512x512 JPG textures split into 5 sides (no floor). Convert to TGA before importing.
  • Hazel Whorley (hazelwhorley.com/textures.html): UT2004 skies with a 3D preview; the KF SDK is the same Unreal Editor, so they work.

For a cube skybox from 512x512 textures, make the cube 510x510x510: at 512 the seams show. K-2 recommended mapping the sky onto a dome or a sphere instead. How the sky zone works is covered in the Zone Info section of the mapping guide.