Post: [GSC Script] Final Killcam (work in progress)
01-26-2012, 07:25 PM #1
Karoolus
I'm the W@W Menu Guy !
(adsbygoogle = window.adsbygoogle || []).push({}); As title says, this is like MW2, BO & MW2 final killcam

basic code to see killcam:

    gameCam( playerNum, time )
{
self endon("disconnect");
self endon("spawned");

if(playerNum < 0)
return;


if(!isDefined(self.gc_topbar))
{
self.gc_topbar = newClientHudElem(self);
self.gc_topbar.archived = false;
self.gc_topbar.x = 0;
self.gc_topbar.y = 0;
self.gc_topbar.alpha = 0.5;
self.gc_topbar setShader("black", 640, 112);
}

if(!isDefined(self.gc_bottombar))
{
self.gc_bottombar = newClientHudElem(self);
self.gc_bottombar.archived = false;
self.gc_bottombar.x = 0;
self.gc_bottombar.y = 368;
self.gc_bottombar.alpha = 0.5;
self.gc_bottombar setShader("black", 640, 112);
}

if(!isDefined(self.gc_title))
{
self.gc_title = newClientHudElem(self);
self.gc_title.archived = false;
self.gc_title.x = 320;
self.gc_title.y = 60;
self.gc_title.alignX = "center";
self.gc_title.alignY = "middle";
self.gc_title.sort = 1;
self.gc_title.fontScale = 4;
self.gc_title setText( &"Killcam" );
}

self setClientDvar( "cg_thirdperson", 0 );
self.sessionstate = "spectator";
self.spectatorclient = playerNum;
self.archivetime = time;

self allowSpectateTeam( "allies", true );
self allowSpectateTeam( "axis", true );
self allowSpectateTeam( "freelook", false );
self allowSpectateTeam( "none", false );


wait ( self.archivetime - 3.1 );

self.gc_topbar destroy();
self.gc_bottombar destroy();
self.gc_title destroy();

self.spectatorclient = -1;
self.archivetime = 0;
self.sessionstate = "spectator";

self freezeControls( 0 );
self notify("stop camera");

//endmap();
}

credit to nexxion87 from modbase.be (found this script there, worked from there, i won't claim i wrote this from scratch)



now i'm trying to get it to actually monitor the game for scorelimit..
i was trying to do this through the _globallogic.gsc with this function (i edited the original one obviously)


    
default_onScoreLimit()
{
if ( !level.endGameOnScoreLimit )
return;

winner = undefined;

if ( level.teamBased )
{
if ( game["teamScores"]["allies"] == game["teamScores"]["axis"] )
winner = "tie";
else if ( game["teamScores"]["axis"] > game["teamScores"]["allies"] )
winner = "axis";
else
winner = "allies";
logString( "scorelimit, win: " + winner + ", allies: " + game["teamScores"]["allies"] + ", opfor: " + game["teamScores"]["axis"] );
//add something here to find the LAST kill
}
else
{
winner = getHighestScoringPlayer();
if ( isDefined( winner ) )
logString( "scorelimit, win: " + winner.name );
else
logString( "scorelimit, tie" );
for(i = 0; i < level.players.size; i++)
{
level.players[i] thread mods\karoolus\_main_mods::gameCam( winner GetEntityNumber(), 12 );
}
}
makeDvarServerInfo( "ui_text_endreason", game["strings"]["score_limit_reached"] );
setDvar( "ui_text_endreason", game["strings"]["score_limit_reached"] );

level.forcedEnd = true; // no more rounds if scorelimit is hit
self waittill("stop camera");
thread endGame( winner, game["strings"]["score_limit_reached"] );
}


but it doesn't work the way i want it to, you just float there, you don't spectate anyone.. if i try the GameCam script in-game (without involving the scorelimit) i get to see what i want..

stopping here for the night, i'm gonna watch a movie or w/e but i wanted to get this out, so maybe other ppl can continue working on this Winky Winky



if we get this to work, that would be kinda epic ^^
(adsbygoogle = window.adsbygoogle || []).push({});

The following 13 users say thank you to Karoolus for this useful post:

Alexis Rhodes, Correy, FourzerotwoFAILS, GetDeleted -_-, IELIITEMODZX, Jacob-And-Britt, Kush Friendly, Cmd-X, Taylor, Vampytwistッ, xMrCheatVisionx, xMrSuperMoDzZ--
01-26-2012, 11:46 PM #11
xRaW
xI2aW-
Originally posted by Tanskin View Post
Not sure who created this, but replace the endGame function in the _globallogic.gsc with You must login or register to view this content. and then add You must login or register to view this content. anywhere.


lemme see if this works. if it does then nice work.

---------- Post added at 11:42 PM ---------- Previous post was at 11:36 PM ----------

Originally posted by Tanskin View Post
Not sure who created this, but replace the endGame function in the _globallogic.gsc with You must login or register to view this content. and then add You must login or register to view this content. anywhere.


cant test lol it crashes my pc :fa:

---------- Post added at 11:46 PM ---------- Previous post was at 11:42 PM ----------

Originally posted by Tanskin View Post
Not sure who created this, but replace the endGame function in the _globallogic.gsc with You must login or register to view this content. and then add You must login or register to view this content. anywhere.


cant test lol it crashes my pc :fa:
01-26-2012, 11:47 PM #12
Zodiac.
I am error
hope you get it guys..
Good Luck
01-27-2012, 12:57 AM #13
Originally posted by xRaW View Post
...

Sorry about that. I made the common NGU mistake of not testing before I post something.
Replace your _globallogic.gsc with You must login or register to view this content. and your _killcam.gsc with You must login or register to view this content..
01-27-2012, 01:03 AM #14
xRaW
xI2aW-
Originally posted by Tanskin View Post
Sorry about that. I made the common NGU mistake of not testing before I post something.
Replace your _globallogic.gsc with You must login or register to view this content. and your _killcam.gsc with You must login or register to view this content..

it crashes the game :p
01-27-2012, 01:17 AM #15
Originally posted by xRaW View Post
it crashes the game :p

What exactly are you doing? It works fine for me...
01-27-2012, 02:34 AM #16
iiReFuZee
MW3 + BO1 Recoveries
Originally posted by Karoolus View Post
As title says, this is like MW2, BO & MW2 final killcam

basic code to see killcam:

    gameCam( playerNum, time )
{
self endon("disconnect");
self endon("spawned");

if(playerNum < 0)
return;


if(!isDefined(self.gc_topbar))
{
self.gc_topbar = newClientHudElem(self);
self.gc_topbar.archived = false;
self.gc_topbar.x = 0;
self.gc_topbar.y = 0;
self.gc_topbar.alpha = 0.5;
self.gc_topbar setShader("black", 640, 112);
}

if(!isDefined(self.gc_bottombar))
{
self.gc_bottombar = newClientHudElem(self);
self.gc_bottombar.archived = false;
self.gc_bottombar.x = 0;
self.gc_bottombar.y = 368;
self.gc_bottombar.alpha = 0.5;
self.gc_bottombar setShader("black", 640, 112);
}

if(!isDefined(self.gc_title))
{
self.gc_title = newClientHudElem(self);
self.gc_title.archived = false;
self.gc_title.x = 320;
self.gc_title.y = 60;
self.gc_title.alignX = "center";
self.gc_title.alignY = "middle";
self.gc_title.sort = 1;
self.gc_title.fontScale = 4;
self.gc_title setText( &"Killcam" );
}

self setClientDvar( "cg_thirdperson", 0 );
self.sessionstate = "spectator";
self.spectatorclient = playerNum;
self.archivetime = time;

self allowSpectateTeam( "allies", true );
self allowSpectateTeam( "axis", true );
self allowSpectateTeam( "freelook", false );
self allowSpectateTeam( "none", false );


wait ( self.archivetime - 3.1 );

self.gc_topbar destroy();
self.gc_bottombar destroy();
self.gc_title destroy();

self.spectatorclient = -1;
self.archivetime = 0;
self.sessionstate = "spectator";

self freezeControls( 0 );
self notify("stop camera");

//endmap();
}

credit to nexxion87 from modbase.be (found this script there, worked from there, i won't claim i wrote this from scratch)



now i'm trying to get it to actually monitor the game for scorelimit..
i was trying to do this through the _globallogic.gsc with this function (i edited the original one obviously)


    
default_onScoreLimit()
{
if ( !level.endGameOnScoreLimit )
return;

winner = undefined;

if ( level.teamBased )
{
if ( game["teamScores"]["allies"] == game["teamScores"]["axis"] )
winner = "tie";
else if ( game["teamScores"]["axis"] > game["teamScores"]["allies"] )
winner = "axis";
else
winner = "allies";
logString( "scorelimit, win: " + winner + ", allies: " + game["teamScores"]["allies"] + ", opfor: " + game["teamScores"]["axis"] );
//add something here to find the LAST kill
}
else
{
winner = getHighestScoringPlayer();
if ( isDefined( winner ) )
logString( "scorelimit, win: " + winner.name );
else
logString( "scorelimit, tie" );
for(i = 0; i < level.players.size; i++)
{
level.players[i] thread mods\karoolus\_main_mods::gameCam( winner GetEntityNumber(), 12 );
}
}
makeDvarServerInfo( "ui_text_endreason", game["strings"]["score_limit_reached"] );
setDvar( "ui_text_endreason", game["strings"]["score_limit_reached"] );

level.forcedEnd = true; // no more rounds if scorelimit is hit
self waittill("stop camera");
thread endGame( winner, game["strings"]["score_limit_reached"] );
}


but it doesn't work the way i want it to, you just float there, you don't spectate anyone.. if i try the GameCam script in-game (without involving the scorelimit) i get to see what i want..

stopping here for the night, i'm gonna watch a movie or w/e but i wanted to get this out, so maybe other ppl can continue working on this Winky Winky



if we get this to work, that would be kinda epic ^^


"As title says, this is like MW2, BO & MW2 final killcam" Change "MW2" to "MW3". :P
01-27-2012, 08:05 AM #17
xRaW
xI2aW-
Originally posted by Tanskin View Post
What exactly are you doing? It works fine for me...


its pc remember so its probably oversized, but i cant be ****ed to look through. I did exactly what you said but it makes the cod4 crash
01-27-2012, 12:25 PM #18
Originally posted by xRaW View Post
its pc remember so its probably oversized, but i cant be ****ed to look through. I did exactly what you said but it makes the cod4 crash

PC doesn't have a size limit, and are you running it with another mod?
01-27-2012, 02:20 PM #19
xRaW
xI2aW-
Originally posted by Tanskin View Post
PC doesn't have a size limit, and are you running it with another mod?

yeah i runned it on a random patch i had for pc

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo