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

Members Online

»
0 Active | 102 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Tutorials

»
CoD4 Mapping
ratings:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
Rotating Fan with light effect in COD4
Versions: You must be logged in to view history.
Rotating Fan with light effect in COD4 - AmishThunder

This tutorial involves some scripting and lighting familiarity, lets get dirty.

Create your area you want your fan and light.

First make a fan.
Right click on the grid -> script -> script_model
Select the model "icbm_turbofan64" or any other size you want.
Now give it the "Key/Value" of "targetname / fan1"

Now make your spot light.
Create your light entity, null, and connect them.
Refer to Lighting 101 if unsure how.
Select "Primary_Spot" for your light and customize the rest so that the light clearly touches the surface you want your shadow on..

You are now done in your map!

--------------------------------------------------------------

Lets begin the scripting part, its not has hard as you may suspect.

Open your .gsc
If you don't have one yet then open "mp_test.gsc" and adjust accordingly with your map name.

Create your thread
Add this to the first main() bracket.

Quote:


thread fanSpin();


Now under the last } for the main() bracket add this code.

Quote:

fanSpin() {
fan1 = getEnt( "fan1" , "targetname" );
//fan2 = getEnt( "fan2" , "targetname" );

//Code by AmishThunder
// www.kramerartanddesign.com
while (1)
{
fan1 rotateyaw( 360, 5, 0, 0 );
//fan1 rotateyaw( degrees, time in seconds, 0, 0 );

//fan2 rotateyaw( 360, 5, 0, 0 );

wait 4.9;
}
}


You may add as many fans as you like but copy a new segment and up the number by 1.

www.kramerartanddesign.com

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

»