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

Members Online

»
0 Active | 51 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

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 4
Category: CoD4 MP Mapping
CoD 4 mapping and level design for multiplayer.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: New Tut
xcp_naruto005
General Member
Since: Jul 7, 2008
Posts: 37
Last: Nov 1, 2008
[view latest posts]
Level 2
Category: CoD4 MP Mapping
Posted: Tuesday, Sep. 16, 2008 08:10 pm
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
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD4 MP Mapping
Posted: Tuesday, Sep. 16, 2008 08:21 pm
A few notes on your tutorial:

1) you say to give the trigger a targetname of doortrig, but in the script you use doortrig4.

2) "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"
There is no 'change me' in your script (unless I'm getting really tired)
You also in your tutorial say to give the doors the targetname of 'leftdoor' and 'rightdoor' for example.. while in the script you ise leftdoor1 and rightdoor1. My guess is that's got to do with the 'changeme' thing...

3) Why are you using getentarray on the trigger, if you use only one trigger to begin with?
Share |
xcp_naruto005
General Member
Since: Jul 7, 2008
Posts: 37
Last: Nov 1, 2008
[view latest posts]
Level 2
Category: CoD4 MP Mapping
Posted: Tuesday, Sep. 16, 2008 09:13 pm
for 1 and 2.

OOPS!!!!!! I did change that I must of forgot to hit update [banghead] sorry and my 10 min is up if it gets excepted I will change it sorry this is my first tutorial and about number 3 most of the script is from the open door tutorial I just changed it so it can open more than one door at a time but as you can see from the vid it works and no errors.

sorry[sad]

edited on Sep. 16, 2008 05:16 pm by xcp_naruto005
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Tuesday, Sep. 16, 2008 09:35 pm
you should choose more meaningful topics, "new tut" could be anything
Share |
xcp_naruto005
General Member
Since: Jul 7, 2008
Posts: 37
Last: Nov 1, 2008
[view latest posts]
Level 2
Category: CoD4 MP Mapping
Posted: Tuesday, Sep. 16, 2008 09:53 pm
Sevenz writes...
Quote:
you should choose more meaningful topics, "new tut" could be anything

I know sorry i would change if i could I tryed to change it but the forum would not let me why can we only change what we post with in 10min why not forever like other forums?
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Tuesday, Sep. 16, 2008 10:18 pm
to prevent excessive bumping, changes on old posts (confuses users reading these threads later), etc.
Share |
abacus
General Member
Since: Feb 5, 2008
Posts: 22
Last: Mar 13, 2009
[view latest posts]
Level 1
Category: CoD4 MP Mapping
Posted: Wednesday, Dec. 24, 2008 05:39 pm
[confused]
Ok stop messing about where's the code ?????
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD4 MP Mapping
Posted: Wednesday, Dec. 24, 2008 05:47 pm
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;
}

Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 MP Mapping

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

»