Tutorials by Bob Lawrence
World Editor Tutorial
Presentation of GEdit
3.1 Dynamic lights
A DynamicLight entity is a light where you can program a sequence of lightning, like if there was a flickering light, for example. You can also attach a dynamic light to a model like in an elevator. Switch to Template Mode,
and select, in the Template Panel, a DynamicLight entity from the Entity List.
Click on the button that represents a "light bulb" and move the blue cross, that represents the entity in the Top View, a bit away from the original Light entity you added in the Chapter 2. Then, press the Enter key to add it to the world. You have to lower the brightness of the original Light (the one you added in the Chapter 2 - Building a simple room) in order to see clearly the new Dynamic Light. To do so, click on the Entity Dialog button,
select the Light1 entity in the drop down menu and modify the light value by double-clicking on the "light" row and enter the value 300.
In the Drop down menu, choose the DynamicLight1 entity. Change the Color to a perfect red (255 0 0), increase the MaxRadius to 800 and enter, in the RaduisFunction, "zzzzaaaaaaammmaaaaaaaaaazzzaaaarrrraaaaaaaaaaa" as shown below:
a=MinRadius, z=MaxRadius, and the alphabet letters between represent the Radius value between Min and Max. The string you entered in the RadiusFunction corresponds to a sequence that will modify our Radius as follow: 800, 50, 375, 50 800, 50, 520, 50, so our red dynamic light will look like it's blinking.
3.2 Spot lights
Switch back to Template Mode, in the Template Panel choose a Spotlight entity in the Entity List and click on the "light bulb" button. In the Top View, move it in a corner of the room. In the Front View, we move it close to the ceiling. Then, press the Enter key.
Click on the Entity Dialog button and select, in the Drop down menu, the Spotlight1 entity. Modify the Angles to X=0 Y=200 Z=340, the Arc to 20, the Color to a dark green (0,128,0), and the Light to 800.
If you compile the level, you will see the dynamic red light blinking and the spot light casting a green light against the west wall.
You can also set different blinking spot lights by changing the Style value, 0 being a plain spot light.
Switch back to Template Mode and, in the Template Panel, choose a Corona entity in the Entity List. Move it the same way you did with the spot light over the Spotlight entity. Click on the Entity Dialog button and choose, in the Drop down menu, the Corona1 entity. Change the Color value to the same dark green (0, 128, 0) and the MaxRadius to 60, which represents the size of the corona.
Notice that you can also attach a Corona to a model, like an elevator. Compile the level. In the room, you have now a blinking dynamic red light, a green spot light casting on the west wall and if you look at its origin, you can see a green corona around the spot light.