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 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: How to end a thread
clanhelio
General Member
Since: Aug 30, 2008
Posts: 223
Last: Mar 24, 2011
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Saturday, Nov. 20, 2010 06:42 am
Try
self notify("end_killcam");
Share |
Leal
General Member
Since: Feb 5, 2010
Posts: 196
Last: Aug 18, 2013
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Saturday, Nov. 20, 2010 10:13 pm
It didnt work. I saw that in the tdm gametype, at the playerkilled thread they used:

Code:
// Stop thread if map ended on this death
if(level.mapended)
	return;
		
self.switching_teams = undefined;
self.joining_team = undefined;
self.leaving_team = undefined;
	
body = self cloneplayer(deathAnimDuration);
thread maps\mp\gametypes\_deathicons::addDeathicon(body, self.clientid, self.pers["team"], 5);

delay = 2;	// Delay the player becoming a spectator till after he's done dying
wait delay;	// ?? Also required for Callback_PlayerKilled to complete before respawn/killcam can execute

if(doKillcam && level.killcam)
	self maps\mp\gametypes\_killcam::killcam(attackerNum, delay, psOffsetTime, true);


"if(level.mapended)", is this what stops the killcam when the map ends?
Share |
IzNoGoD
General Member
Since: Nov 29, 2008
Posts: 694
Last: Nov 10, 2012
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Saturday, Nov. 20, 2010 11:47 pm
Nope, it prevents you from seeing a killcam when you are last death on map.
example: score limit is 50, killcam is on. You are 50th death on your team, you should see the killcam, but, as scorelimit is reached, you dont see it (level.mapend=true).
Share |
clanhelio
General Member
Since: Aug 30, 2008
Posts: 223
Last: Mar 24, 2011
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Sunday, Nov. 21, 2010 06:07 am
You sure it didn't work? It seemed logical, I saw it in _killcam.gsc when I skimmed through it.

Also don't make level.mapended true, you'll break all kinds of poo-poo [cool]
Share |
Leal
General Member
Since: Feb 5, 2010
Posts: 196
Last: Aug 18, 2013
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Sunday, Nov. 21, 2010 11:03 am
IzNoGoD writes...
Quote:
Nope, it prevents you from seeing a killcam when you are last death on map.
example: score limit is 50, killcam is on. You are 50th death on your team, you should see the killcam, but, as scorelimit is reached, you dont see it (level.mapend=true).


Aha all right!
Share |
Leal
General Member
Since: Feb 5, 2010
Posts: 196
Last: Aug 18, 2013
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Sunday, Nov. 21, 2010 11:04 am
clanhelio writes...
Quote:
You sure it didn't work? It seemed logical, I saw it in _killcam.gsc when I skimmed through it.

Also don't make level.mapended true, you'll break all kinds of poo-poo [cool]


Ahhh, yes it works now! I used the wrong variable -.- (self instead of player :P). Thank you very much!
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

»