Hi I am going to show you to make 2 opening doors like French doors so the first thing.
1. Make a door frame for your door
2. Next make a brush that will fit the empty space within your door frame.
3. Now find a door texture you like and then split the door so you end up having 2 doors using the clipper tool (press x then holding down the Ctrl+Alt keys click where you would like brush to be split then press shift+Enter).
4. Now you need to make a brush for your door hinge the best way to do it is to set the grid to 0.5 and make the brush 2x2 and place the brush shown in the image below (keep the brush selected).
5. With the hinge still selected we need to have a texture to tell the game what it is doing so you are looking for a texture called origin the texture is orange with the word orig on it 3 times (keep the brush selected).
6. Now select the door that the hinge is next to then right click on the grid and select script>brushmodel if you have done it right on the 2D grid you will see brushmodel in red. With the hinge and the door still selected press n and in key type targetname and in value put in a name you would like for that door e.g. Leftdoor when you are happy press enter and press n to close the window.
7. Repeat step 4-6 for the other door but when you go to name the other door give it a different name e.g. rightdoor.
8. Now the last thing to do in radiant make a brush that will cover the hole door as shown in the image below now give it a trigger texture then with the brush selected right click on the 2D grid and go to trigger>use_touch with the brush still selected press n and give it a key of targetname and for the value doortrig.
Now we need to make a gsc file for the door save radiant and move it to one side. If you know how to make a new file go ahead but for you that don’t just go to
:\Program Files\Activision\Call of Duty 4 - Modern Warfare\raw\maps\mp
it is best to make a shortcut to this folder because when you are scripting you will be going back and forward to this folder a lot. When you in there just copy and paste a GSC file and rename it to door now open it and delete the script in there don’t worry this is a copy so you are not going to mess anything up now place this script into that file and save it.
Code:
main()
{
doortriggers = getentarray("doortrig4","targetname");
for(i=0;i<doortriggers.size;i++)
doortriggers[i] thread door_think();
}
door_think()
{
self.doormoving = false;
self.doorclosed = true;
self.doormodel = getent("leftdoor1", "targetname");
self.doormodel2 = getent("rightdoor1", "targetname");
while (1)
{
self waittill("trigger");
if(!self.doormoving)
self thread door_move();
}
}
door_move()
{
self.doormoving = true;
if(self.doorclosed)
{
self.doormodel rotateyaw(90,1,0.5,0.5);
self.doormodel2 rotateyaw(-90,1,0.5,0.5);
self.doormodel waittill("rotatedone");
self.doorclosed = false;
}
else
{
self.doormodel rotateyaw(-90,1,0.5,0.5);
self.doormodel2 rotateyaw(90,1,0.5,0.5);
self.doormodel waittill("rotatedone");
self.doorclosed = true;
}
self.doormoving = false;
}
Now we need to change some script on the 11th and 12th line now where it says change me replace the 11th line “change me” with the name of the left door e.g. “leftdoor” then do the same on the 12th line change the word with the name of the right door and then save and close. Now open your map GSC file and above maps\mp\_load::main(); put maps\mp\door::main(); then save and close now go to level comiling tab and go to number 4 and on the right hand box put;
rawfile,maps/mp/door.gsc
save and close then compile your map then play
if you have done it right it will look like this
If you need any help my xfire is naruto005
thanks to HarkoninVSC for making the first door tutorial
edited on Sep. 16, 2008 04:11 pm by xcp_naruto005