cod4 vents

Have questions about CoD4 mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
User avatar
t3vY
CJ Worshipper
CJ Worshipper
Posts: 362
Joined: January 15th, 2006, 1:57 pm
Location: zamušani

cod4 vents

Post by t3vY » February 15th, 2008, 3:02 pm

In first custom cod4 map that i played( name of the map is mp_subway_beta ) there was some kind of vents on the celling. And they were rotating and the light was coming trough from behind. I just want to know how to make this rotating vent. And if i would put lights (like green, blue and other colours) from behind would the light like blink? (hope you know what i mean)
Image

topher
CJ Spammer!
CJ Spammer!
Posts: 742
Joined: December 4th, 2005, 9:17 am
Location: OK
Contact:

Post by topher » February 15th, 2008, 6:49 pm

Ok so go into Radiant. Design your vent, or insert the model.
Select the vent and right click it on the 2d grid. Now go all the way down to the Section: Script and Click on BrushModel.

Now press N to bring up the entities and type in the following

Key:targetname
Value:rotatvent1

Done for the mapping part.

In you main gsc file put this code in it..

Code: Select all

maps\mp\rotatvent1::main();
now create a new gsc file name it rotatvent1.gsc and put this in it.

Code: Select all

main() 
{ 
thread rotatvent1();  
}

rotatvent1() 
{ 
platform = getent ("rotatvent1","targetname");
while(1) 
{
wait(1);
platform rotateyaw ( 360, 10, 0.5, 0.5); //10 is the speed.. if you want to make it faster change it to a lower number.
platform waittill ("rotatedone");
} 
}
Pretty much this tutorial, but with the rotating code.
http://codjumper.com/forums/viewtopic.p ... t=platform

I'm not sure if it would blink or not.. maybe if you got the speed just right.. but not sure.
Image

User avatar
t3vY
CJ Worshipper
CJ Worshipper
Posts: 362
Joined: January 15th, 2006, 1:57 pm
Location: zamušani

Post by t3vY » February 16th, 2008, 7:17 pm

Tnx but one thing:
Select the vent and right click it on the 2d grid. Now go all the way down to the Section: Script and Click on BrushModel.
when i try to do this i get this: failed to create entity

:roll:
Image

topher
CJ Spammer!
CJ Spammer!
Posts: 742
Joined: December 4th, 2005, 9:17 am
Location: OK
Contact:

Post by topher » February 16th, 2008, 10:48 pm

Hmm.. well if its a model you don't have to do that.. but if you made the vent with brushes you would have to make it a brushmodel so you can name it... Other than that I dont know :/
Image

User avatar
t3vY
CJ Worshipper
CJ Worshipper
Posts: 362
Joined: January 15th, 2006, 1:57 pm
Location: zamušani

Post by t3vY » February 17th, 2008, 10:03 am

Ok the fan is working now :D
But i made a spot light above the fan. The problem is that the fan is turning but the shadow on the flor is static(it doesnt move).
Any ideas?
Image

Post Reply