O'Reilly logo

Mastering UDK Game Development Hotsht by John P. Doran

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a flickering light

Now that we have created something simple, let's attempt to create something a little less trivial.

Engage Thrusters

The following are the steps needed to create a light that flickers over time:

  1. Open up our UnrealScript IDE again. Under the Properties menu, replace everything back to editor within the Additional Command Line Arguments option.

    Tip

    You can also just start up UDK and it will automatically ask you to recompile scripts if they have been changed.

  2. Right-click on the Hotshot\Classes folder and select Add | New Item..., and then in the window that pops up under Name put FlickeringLight.uc, then click on Add.
  3. Now replace the code provided with the following heavily commented code:
    class FlickeringLight extends PointLightMovable ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required