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

Members Online

»
0 Active | 18 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 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: collision map for mp
viraj_mantri
General Member
Since: Nov 15, 2006
Posts: 66
Last: May 16, 2007
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Friday, Dec. 29, 2006 12:02 pm
how to create collision map files for models done in mayasoftware and imported into radiant as xmodel.
in other words say if i created a furniture in maya software.then i imported it into radiant as an xmodel. how will i create a collision map for the same furniture so that i don't pass through it while playing the game..
Share |
OLD_MAN_WITH_GUN
General Member
Since: May 13, 2006
Posts: 754
Last: Jan 23, 2010
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Friday, Dec. 29, 2006 01:11 pm
Start with a new map in radiant and insert your model at origin (0,0,0). Then, rebuild your model with clippingbrushes. After that, save the map-file into the folder collmaps with exactly the same name as your model.
Share |
viraj_mantri
General Member
Since: Nov 15, 2006
Posts: 66
Last: May 16, 2007
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Saturday, Dec. 30, 2006 09:15 am
thanxs for ur advice, i need a small favour can i make the same stuff (collmaps)for vehicle model which will be moving in mp so that it can collide with any object in its motion.so that i can make my player atleast stand on that(moving vehicle).pls let me know can i achieve my objective of collision for moving vehicle?

edited on Dec. 30, 2006 04:19 am by viraj_mantri
Share |
OLD_MAN_WITH_GUN
General Member
Since: May 13, 2006
Posts: 754
Last: Jan 23, 2010
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Monday, Jan. 1, 2007 12:24 pm
The collmaps only works for static models. For moving models you have to insert the clippingbrushes into your map, make them to a script_brushmodel and move them along with your model.
Share |
viraj_mantri
General Member
Since: Nov 15, 2006
Posts: 66
Last: May 16, 2007
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Tuesday, Jan. 2, 2007 06:57 am
How could i make clipping brushes model bcoz when i apply clip_texture to the brush and try to connect it to my vehc i get msg 'need to select two brush' ??
And so my player climbs that brush but wont move when vehc moves ahead.so i wont get that feeling of travelling.

can u pls explain me which texture,how to connect,what is to be done so that i can hav collision in moving vehc .

edited on Jan. 2, 2007 02:00 am by viraj_mantri
Share |
BloodySoldier
General Member
Since: Aug 17, 2006
Posts: 318
Last: Apr 6, 2009
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Tuesday, Jan. 2, 2007 08:04 am
ok in order to get ut clips moving along with ur vehicle u select all the clips for the vehicle and make them a script_brushmodel give them a targetname of tankclip or w/e. then in ur .gsc u must tell the game to move the clips along with ur vehicle.

PS this script i have not tested and u must rename parts of it so it would fit ur vehicle or w/e ur using. and this script uses a trigger.

example script:

Code:
//created by |ZERO|BloodySoldier in 5 minutes
main()
{
maps\mp\_load::main();

thread tankmove();
}

tankmove()
{
tank = getent("tankmove","targetname");
tankclip = getent("tankclip","targetname");
trig = getent("tanktrig","targetname");
{
trig waittil("trigger");
tank movex(200,10);
tankclip movex(200,10);
tank waittil("movedone");
tankclip waittil("movedone");
}
}


tell me if it works and if u get an error post it and we can try to find out whats wrong. most likely i forgot a letter or sumthing
Share |
viraj_mantri
General Member
Since: Nov 15, 2006
Posts: 66
Last: May 16, 2007
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Monday, Jan. 8, 2007 05:29 am
thankx friend it worked for mp, can u pls help me since my vehc is moving and player can sit over that and move ,now there might be probable chances that player can also come in front of moving vehc so he should be hurted or killed.
but when i applied hurt texture problem is that it wont move with the brush so player wont get killed .pls give me some idea.
Share |
viraj_mantri
General Member
Since: Nov 15, 2006
Posts: 66
Last: May 16, 2007
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Tuesday, Jan. 16, 2007 05:05 am
Friendz, i need some help,i am making a moving vehc but the prob is in radient when i right click->select script model and then a vehc it comes in radient facing towards +ve x-axis.
but the prblem is when i rotate my vehc towards y or x-y and then set the motion in that diection... after compiling my vehc moves in that particular direction but it wont follow the rotation to which i hav twisted them before i.e. it retains to face towards +ve x-axis.
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD2 Scripting
Posted: Tuesday, Jan. 16, 2007 07:53 am
are you sure your map compiled correctly? Because tht should not be happening. Anyway.. you can rotate your vehicle in your script too. There is a great tutorial called "moving things" in the CoD tutorial section, which also deals with rotating.
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Tuesday, Jan. 16, 2007 08:49 am
Here is a simplified version of a plane flyby script, I modified it to be a simple basis for vehicle use.

To make your clips move with the vehicle it would be easier to link them using linkto(); command.
For eg;
clips enablelinkto();
clips linkto(tank);

Do this before you start moving the vehicle.

Code:
main() {

thread Start();

}



Start() {

	//The entity you want moving along a vehicle path
	ent = getent("truck", "targetname");
	
  //The first startnode of the vehicle path
  firstNode = getent("startnode", "targetname");
  
	//Set the entity on the startnode
	ent.origin = firstNode.origin;
	
 	//Match the entities angles with the startnode
 	ent.angles = firstNode.angles;
 	
	//wait a random amount of time or change to wait on a triggered event  
	wait (randomint(3) *10);
	
	//Start the moving stuff
  moveIt(ent, firstNode);
  
}

moveIt(object, startNode) {

	//If the first node is not targeting another vehicle node then quit
  if (!isdefined (startNode.target)) 
    return;

	//Build the path
  pathNodes = buildPath(startNode);
	if (!isdefined(pathNodes))
		return;
	
	//Set the speed of travel
	speed = 10;
	
  for (z = 0; z < pathNodes.size; z++ ) {
    object rotateto (pathNodes[z].angles, speed);    
    object moveto (pathNodes[z].origin, speed);
    object waittill("movedone");
  }
}

buildPath (fromNode) {
	  pathNodes = [];
	  nextNode = getent(fromNode.target, "targetname");
	  while (isdefined(nextNode)) {
	    pathNodes[pathNodes.size] = nextNode;
	    if (!isdefined(nextNode.target))
	      nextNode = undefined;
	    else      
	      nextNode = getent(nextNode.target, "targetname");
	  }
		return pathNodes;
}
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

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

»