Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds
Watch MODSonair

Members Online

»
0 Active | 48 Guests
Online:

LATEST FORUM THREADS

»
Using Teamspeak
Teamspeak Servers
map loading error
CoD2 MP Mapping

Downloads

»
Upgrade for Access
rating:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
Swinging Light
Downloaded 72 times
Here is a little tutorial for making swinging lights posted by rEdrumMDK. I made the map file for this suppliment with the directions below.
Also to modify the light entitie properties use the J key.

SWINGING LIGHTS
By: lophyte

Special thanks to Unoid for helping me with figuring out how to make a swinging light. It turns out its actually quite easy.

Making sure nothing is selected, right click on the grid and go to env, then env_swinglight_long_wbulbs_fixed. This creates a light fixture for us to work with. In the Z window, raise it so that the top touches the ceiling. Go into the Entity Properties window for the env, and set the name to something shorter like "swinglight_1".

This is where we create our lights. Right click on the grid and select light. Go into the Entity Properties window for the light, and click the "Model..." button. In the model browser, select base/models/mapobjects/lights/florescent_bulb.ase and click OK.

Note: if the model doesn't show up in the grid and the light stays as a box, clone it and delete the original.

Again, in the Entity Properties for our light, add key "bind", with the name of the env as the value. Then add key "bindToJoint", and value "bone5". Now clone this light, and line them both up directly under the fixture.





OPTIONAL: Infinitely Swinging Light

If you'd like to add a light that swings back and forth and never stops, this requires a little bit of scripting. Create a mover by right clicking on the grid, going to func, and selecting func_mover. In the Entity Properties, give the mover a descriptive name, ie "slight_mover_1".

Select the env light fixture, and go into the Entity Properties. Add a key "bind", with the value being the name you gave the mover. Now create a file in the same folder as your map, with the same name, and a .script extension (ie, if your map is called swinginglights.map, the script file shoule be called swinginglights.script)

Open up the script file, and add this simple piece of code:

Code:

void main() {
$slight_mover_1.sway(0, 0, '20 0 0');
}



EDIT: Apologies, I'm an idiot. The first value in sway() seems to be the time it takes before causing the mover to sway again, ie it swings once, waits that amount of time (in milliseconds), then swings again. 50 looks nice with a rotation of 20. Play around with these values to see what they do, but definitely don't leave the first one at 0 otherwise your light won't swing.

Of course, you'll want to change slight_mover_1 to whatever you named your mover entity. As for the number values, take a look at the command reference for a more detailed description. For our purposes, we just need to look at the '20 0 0': this causes the light to sway on a certain axis. The first number is x, the second is y, and the third is z. Play around with these values to find out how they affect your light.


That's all! Compile your map and fire it up in DOOM, and all should be well. Suggestions, comments and feedback welcome.


- lophyte

by lophyte (email)
 

Comments

»
Login/Register for Comments

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»