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

Members Online

»
0 Active | 12 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 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
Previous Page
subscribe
Author Topic: Crosshair in thirdperson & xmodel collision
n3BuL
General Member
Since: Nov 10, 2008
Posts: 44
Last: Jul 2, 2010
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Friday, Jan. 8, 2010 10:44 am
I think it would work - except I'm not really sure why you would need this : model = getentarray("targetname","player_model");
I already made the mod change the player's model, so I don't think this would be neccessary.

And does the colbox even get linked to the player ? Is it the "player.colboxnum = i;" in the middle script?

Just to get something straight: "player clip" is a texture in radiant, right? I never used it before :p

Quote:
-You made a number of the boxes all somewhere out of sight while they wait

Thats the boxes resembling the players ? Because if I already altered the player models in a different way, these should be ignored?

When making all these objects, they should all have the same size as a regular box ?

And one last question:
Should these scripts be in a map's gsc files, or as a new file in a mod - and then add a line to the gametype gsc to thread it.
Share |
clanhelio
General Member
Since: Aug 30, 2008
Posts: 223
Last: Mar 24, 2011
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Saturday, Jan. 9, 2010 01:38 am
Call boxsetup() and waitforconnect() from someplace that's going to run everytime the box war gametype starts up. Put it anywhere you want.

For putting the clip and trigger in the player's position, you'd have to do so everytime the player spawns. Wherever that's dealt with in the gametype.gsc I wouldn't know where that is off the top of my head.

Like this
Code:
colbox = getentarray("targetname","player_colbox");
	colbox[self.colboxnum] moveto(self.origin,.0001);
	colbox[self.colboxnum] linkto(self);


use the clip texture in usage>tools


Use this if you've already set the actual model up:
Code:
boxsetup()
{
	hitbox = getentarray("targetname", "player_hitbox"); //trigger_damage
	colbox = getentarray("targetname","player_colbox");  //player clip
	//model = getentarray("targetname","player_model");    //actual box script_model
	
	for (i = 0; i < hitbox.size; i++)
	{
		hitbox[i] enablelinkto();
		hitbox[i] linkto(colbox[i]);
		//model[i] linkto(colbox[i]);
		colbox[i].isinuse = 0;        //set all boxes as not belonging to any players
	}
}


When making the clip for collision and trigger_damage for health, yeah, ideally you'd want them to have the same dimension's as the player's model [cool]





Wait, I just thought of something. Shoot, can you link things to players?
Share |
Restricted Access Topic is Locked
Page
Previous 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

»