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

Members Online

»
0 Active | 66 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 subscribe
Author Topic: bullettrace name show
church4593
General Member
Since: Sep 6, 2014
Posts: 12
Last: Sep 17, 2014
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Wednesday, Sep. 17, 2014 04:00 pm
Okay so basically what im trying to do here is have a bullettrace script. The bullettrace however is not tracing the bullet its simply tracing the origin itself and when the enemy player touches the trace at the end. Than it shows the enemy players name. This is what I have so far but there are many bugs. Im confused on trying to get it to work because ive never really completely worked with bullettrace before so it still confuses me.

Code:
catchName()
{
	if(isDefined(self) && isDefined(eAttacker) && self isLookingAt(eAttacker))
	//if(isDefined(self))
	{
		if(self.pers["team"] != eAttacker.pers["team"])
		{
			for(;;)
			{
				eyePos = self geteye();
				seename = magicbullet(undefined, self.origin, eAttacker.origin);
				trace = bullettrace(seename, eyePos, true, undefined);
				if(eAttacker istouching(trace))
				{
					self endon("namedone");
					
					playernname = eAttacker.name;
					
						if(isdefined(level.namekill))
							level.namekill destroy();

						level.namekill = newClientHudElem(self);	
						level.namekill.x = 325; //100
						level.namekill.y = 200; //100
						level.namekill.alignX = "center";
						level.namekill.alignY = "middle";
						level.namekill.sort = -3;
						level.namekill.alpha = 1;
						level.namekill.fontScale = 1.25;
						level.namekill.archived = true;
						level.namekill setText(playername);
				}
				else
				{
					if(isdefined(level.namekill))
						level.namekill destroy();
					self notify("namedone");
				}
				wait .5;
			}
		}
	}
}


Any ideas?
Share |
Restricted Access Topic is Locked 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

»