Page 1 of 1
cod4 vents
Posted: February 15th, 2008, 3:02 pm
by t3vY
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)
Posted: February 15th, 2008, 6:49 pm
by topher
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..
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.
Posted: February 16th, 2008, 7:17 pm
by t3vY
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

Posted: February 16th, 2008, 10:48 pm
by topher
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

Posted: February 17th, 2008, 10:03 am
by t3vY
Ok the fan is working now

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?