UDK Scripting
Unreal Kismet – Scripting
Scroll down to see Unrealscript examples

Each light in the level, consists of a static mesh light (that receives the damage), a light volume (to add the illusion of a night time street lamp), a trigger box at the ground level, a point light, and a spot light.

When the street lamp static mesh takes damage, the light volume is toggled to hidden, both lights are toggled off, and the trigger box is disabled, allowing the player to safely continue through the level without raising the alarm.

A sample of spawning 2 Drones. The section labeled, “Making the drones blind”, fires two console commands changing the sight and hearing range of the drone class to 200 Unreal Units. Both drones are attached to another section of kismet (the blue area), this section returns the sight and hearing of the drones back to normal when either of the drones in the squad takes damage, giving the appearance that the drones saw where the shot came from and now engage the player.

Sequence of kismet that fires when the player touches a trigger box under a street lamp that is still on. The console commands returns the sight and hearing range of both drones and wretches to the normal settings.

This section of kismet shows how to script a checkpoint for a non-Marcus character, in this case, Carmine. When the player returns to a checkpoint by either selecting it from a menu or dying and restarting at the point, they spawn as Marcus. Before the player notices, I reset the lights they they shot out after passing through the checkpoint initially, reset the sight of all Locust forces to “blind”, re-stream the appropriate levels/encounters, spawn Carmine, posses Carmine, hide Marcus in a small closet area, give the player silenced weapons and check to see if they were playing in god mode.

The last section of kismet changes the rain storm sound as they enter and exit buildings. Simply put, each building has a trigger volume that upon entering swaps to the appropriate sound. Leaving the building returns to to the outdoor rain storm sound.
Unrealscript

I created a custom health pickup that extends from the medium health class. I used a mesh I created as the new health pickup. This health pickup gives you +10 health if you are at 100 or more health (but does not exceed 200 after the heal), gives you 25 health if you are between 26 – 100, and gives you 50 if you are 25 and below.

The custom health pickup can be found in the actor classes browser under the Medium Health pickup factory.

The healing values can be changed in editor without having to access the script, the default values for the vial are shown.