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

Members Online

»
0 Active | 4 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

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 2
Category: CoD2 SP Mapping
Call of Duty 2 single player mapping, scripting and everything single player.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Door Kick Tutorial
Ace008
General Member
Since: Jul 22, 2005
Posts: 738
Last: Jan 3, 2009
[view latest posts]
Level 6
Category: CoD2 SP Mapping
Posted: Friday, Feb. 23, 2007 03:03 pm
////Door Kick Tutorial by Ace008\\\\\



Alright lets get started

Step 1: Create a node_scripted and give it a targetname:

Value:targetname
Key:door_node



Step 2: Create an actor of your choosing and give him a targetname:

Value:targetname
Key:doorkicker




Step 3: Create your door, which the actor will kick, and turn it into a script_brushmodel. To do this while the door is selected right click in your grid and look for something called script. Inside that you will see script_brushmodel, which you will click. The door will turn blue on the grid to let you know it is
now a script_brushmodel.

Now give the door a targetname:

Value:targetname
Key:door

Also while the door is selected press N and put a check in the box that says DynamicPath.



Step 4: Create another door the same size as the first with the same texture of course and turn it into a script_brushmodel. This door is where the first door will
swing to after the actor kicks it so place it where you want the door to end up.



Step 5: Now select the first door and then the second door and press W to connect them. You will see a blue line indicating they are connected.



Step 6: Draw out a brush and make it a trigger_once. To do this right click in your grid and under trigger there will be
something called once. Now give it a targetname:

Value:targetname
Key:door_trig



Step 7: This is the last part for mapping! Place the scripted node about 10 units away from the door so it looks like the actor is actually kicking it. If it is any farther away it looks kinda odd. Also make sure the node is facing towards the door . To do this on top there is a button that has a Z with an arrow to N(The 8th button on the row) click that and an arrow will appear from the node. Make sure that arrow is pointing towards the door so the actor kicks in the correct direction.

////////////////////

Okay now the feared part, the part everyone hates...Scripting WUHAAAAA.

Step 1: Create a GSC file called mymapname.gsc and copy this code into it:

Code:
#include maps\_utility;

#include maps\_anim;


main()
{

	
              maps\_load::main();
              maps\mymapname_anim::main();

level.player takeallweapons();
level.player giveWeapon ("enfield");
level.player switchToWeapon ("enfield");

thread kick_door();
}
kick_door()
{
	
	
	
	
door_node = getnode ("door_node", "targetname");
		
doortrig = getent("door_trig","targetname");

doortrig waittill("trigger",other);
	

level.doorkicker = getent("doorkicker","targetname");
	level.doorkicker.animname = "doorkicker";
	level.doorkicker.anim_node = door_node;
	level.doorkicker notify ("stop friendly think");

             level.doorkicker thread magic_bullet_shield();
             level.doorkicker.ignoreme = true;
	
	level maps\_anim::anim_reach_solo (level.doorkicker, "kickdoor", undefined, door_node);
	level.doorkicker pushPlayer (false);
	door_node thread maps\_anim::anim_single_solo (level.doorkicker, "kickdoor");
	
	level.doorkicker waittillmatch ("single anim", "soundfx = kickdoor");
	
              door = getent ("door", "targetname");
	door playsound ("kickdoor");
	
	door rotateyaw(90,.5,.2,.2);
	
	door connectpaths();

              level.doorkicker notify ("stop magic bullet shield");
	level.doorkicker.ignoreme = false;

	}




Step 2: Now make another gsc fille and call it mymapname_anim.gsc and copy this code into it:

Code:
#using_animtree("generic_human");
main()
{	
	
	//animations
	level.scr_anim["doorkicker"]["kickdoor"]		= (%kickdoor_guy2);
}



Thats it for scripting, aren't you happy!

//////////////////////

Okay Now for the Sound in your COD2 main folder create a folder called Soundaliases. Inside that create
a new text document and place this code into it:

Code:
name,sequence,file,vol_min,vol_max,vol_mod,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,masterslave,loadspec,subtitle,compression,secondaryaliasname,volumefalloffcurve,startdelay,speakermap,reverb,lfe percentage

#door,,,,,,,,,,,,,,,,,,,,,,,

kickdoor,1,doors/door_wd_kick.wav,0.92,0.92,foley,0.9,0.9,350,2000,auto,,,,,mymapname,,,


Save this as mymapname.csv and you are all done.


Now go compile and admire your work!



edited on Feb. 23, 2007 10:07 am by Ace008
Share |
[DKTM]spitfire(fin)
General Member
Since: Aug 15, 2005
Posts: 112
Last: Feb 1, 2008
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Friday, Feb. 23, 2007 05:45 pm
"Honey I'm home" lol [2guns]

Nice tutorial, we needed this..Thank you!
Share |
Ace008
General Member
Since: Jul 22, 2005
Posts: 738
Last: Jan 3, 2009
[view latest posts]
Level 6
Category: CoD2 SP Mapping
Posted: Friday, Feb. 23, 2007 06:38 pm
Your Welcome! I am glad to help contribute to this great website after all the help you guys have been[thumbs_up].
Share |
StrYdeR
General Member
Since: May 11, 2004
Posts: 11671
Last: Oct 7, 2021
[view latest posts]
Level 10
Admin
Forum Moderator
Im a HOST of MODSonair
Category: CoD2 SP Mapping
Posted: Friday, Feb. 23, 2007 11:56 pm
hey cool - permission to add it to the tutorials section?

[angryalien]
Share |
SparkyMcSparks
General Member
Since: Feb 28, 2004
Posts: 1713
Last: Dec 29, 2016
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD2 SP Mapping
Posted: Saturday, Feb. 24, 2007 12:31 am
Good tutorial, nice to see a new single player one.

Just wonder, if someone were to kick a locked door, wouldn't it fall on the floor? [lol] If it was unlocked, why kick it? [drink]
Share |
babycop
General Member
Since: Feb 18, 2006
Posts: 488
Last: Feb 27, 2010
[view latest posts]
Level 5
Category: CoD2 SP Mapping
Posted: Saturday, Feb. 24, 2007 12:50 am
hey! thanx ace! been looking for this one...gonna use it in my new map...[cool]good job as usual man [2guns]
Share |
Ace008
General Member
Since: Jul 22, 2005
Posts: 738
Last: Jan 3, 2009
[view latest posts]
Level 6
Category: CoD2 SP Mapping
Posted: Saturday, Feb. 24, 2007 01:07 am
Go ahead and add it to the tutorial section if you want Stryder[wave]. Also thanks for the compliments guys!


Quote:
Just wonder, if someone were to kick a locked door, wouldn't it fall on the floor? If it was unlocked, why kick it?


Wouldn't be as dramatic to just turn a door handle. Not to mention it is fun to destroy things[biggrin].

edited on Feb. 23, 2007 08:09 pm by Ace008
Share |
All-Killer
General Member
Since: May 26, 2006
Posts: 140
Last: Nov 23, 2008
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Sunday, Feb. 25, 2007 04:56 pm
Nice one going to use it soon i hope.
Share |
Ace008
General Member
Since: Jul 22, 2005
Posts: 738
Last: Jan 3, 2009
[view latest posts]
Level 6
Category: CoD2 SP Mapping
Posted: Friday, Mar. 9, 2007 01:49 pm
UPDATE


Sorry guys but I forgot to add something in this tutorial. When you make the first door make an origin brush with it that has the same targetname. Make sure the origin texture is touching both the door and the wall near it. Basically think of it as your door hinge. Everything will still work without the origin brush but the door moves really fast without it and looks a little unrealistic. Again I am sorry I forgot to put that information in. If a mod could please update the tutorial I would be thankful.
Share |
MooL
General Member
Since: Sep 12, 2006
Posts: 2
Last: Apr 12, 2007
[view latest posts]
Level 0
Category: CoD2 SP Mapping
Posted: Thursday, Apr. 12, 2007 07:12 pm
Hi when i go to play my map it comes up with a error saying.

Code:
------- sound system successfully initialized -------  --- Common Initialization Complete ---  Error during initialization:  Sound alias file house.csv: Volume Mod Group 'loop' not found.


Hope someone can help me out [wave]
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 SP 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

»