CREATING A SHOOTABLE LIGHT
--------------------------------------------------------------------------------
1. Create a light by drawing a brush (mine was x=4, y=4, z=4). With the brush selected goto Brush->Sphere and give it +-20 sides. Now it looks like a ball.
2. Duplicate it twice by pressing the spacebar twice. Move them a bit away from eachother so they 're easy to select.
3. With the first sphere selected, rightclick the 2D view and select func->window.
4. Press 'N' and give it a Key: target and a Value: lamp, press 'enter'. Add another Key: health and Value: 1, press 'enter' again. (glass breaks after one shot)
5. Next select the second sphere, rightclick the 2D view and select script->object.
6. Press 'N' and give it a Key: targetname and a value: lamp (you should now see a blue arrow connecting the two spheres).
7. Now select the third sphere, rightclick the 2D view and select trigger->box.
8. Hit 'N' again, Key: targetname and Value: lightpost_trigger. Click the damaged box so the trigger responds to bullets (Key: spawnflags, Value: 128 will be added)
9. Now create a script_origin (RMB 2D, script->origin) with a Key: model and a value: static/corona_reg.tik and a Key: targetname, Value: lightpost_corona. The script_origin will now look like a corona. Place that within the lamp as you see fit
10.Now create a script_model with a Key: model and a Value: fx/dummy.tik and another Key: targetname, Value: lightpost_light. Place that script_model where you would like the light to be (this is what actually lightens up the place).
Now the scripting part:
1. Right below Level Waittill Spawn type this:
thread lightpost
2. After that you will see the word end. Right after the word end, type this:
////////////////////////shootable light/////////////////////////
lightpost:
$lightpost_light light 0 0 1 360
$lightpost_trigger triggerable
$lightpost_trigger waittill trigger
$lightpost_trigger nottriggerable
wait .2
thread lightout
end
lightout:
$lightpost_light light 0 0 0 64
$lightpost_corona hide
end
-GHOST DOG