Results 1 to 6 of 6

Thread: Killcam works almost xd

  1. #1
    Lieutenant Loveboy's Avatar
    Join Date
    Nov 2012
    Posts
    546
    Thanks
    229
    Thanked 72 Times in 46 Posts

    Killcam works almost xd

    Hi Guys, i have a last killcam tried , but that works almost, if lastkillcam will open, then it show not how he killed the last, that shows what he did the last 7 seconds xD, but i want to know how he killed and not what he did last 7 seconds. here my modify tdm.gsc:

    Code:
    Callback_PlayerKilled(eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, psOffsetTime, deathAnimDuration)
    {
    ........
    //somewhere down...
    
    	level.lastkillcam = [];
    	level.lastkillcam["attackernum"] = attackerNum;
    	level.lastkillcam["delay"] = delay;
    	level.lastkillcam["psOffsetTime"] = psOffsetTime;
    }
    Code:
    endMap()
    {
    	game["state"] = "intermission";
    	level notify("intermission");
    
    	// Randall -->
    	if (isDefined(level.lastkillcam))
    	{
    		players = getEntArray("player", "classname");
    		for (i = 0; i < players.size; i++)
    		{
    			players[i] thread maps\mp\gametypes\_killcam::killcam(level.lastkillcam["attackernum"], level.lastkillcam["delay"], level.lastkillcam["psOffsetTime"]);
    		}
    	}
    	// <--
    
    	wait 30;
    
    .........
    // Default settings
    Somebody know how to fix that?

    Btw i don't modify the _killcam.gsc

    Thank you for every help and every reply!

  2. #2
    Lieutenant Loveboy's Avatar
    Join Date
    Nov 2012
    Posts
    546
    Thanks
    229
    Thanked 72 Times in 46 Posts
    EDIT: Here problem of video: http://de.xfire.com/video/6066af/

  3. #3
    Private
    Join Date
    Jun 2013
    Posts
    26
    Thanks
    20
    Thanked 3 Times in 1 Post
    I don't know does the killcam can make a time point when the player is killed.

  4. #4
    Lieutenant Loveboy's Avatar
    Join Date
    Nov 2012
    Posts
    546
    Thanks
    229
    Thanked 72 Times in 46 Posts

    Last Killcam Bug

    Hi Guys, i had made a Last Killcam, which not works perfectly.
    As first i defined the killcam:

    Code:
    Callback_PlayerKilled(eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, psOffsetTime, deathAnimDuration)
    {
            ...
    	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);
    
    	// Define Killcam
    	level.lastkillcam = [];
    	level.lastkillcam["attackernum"] = attackerNum;
    	level.lastkillcam["delay"] = delay;
    	level.lastkillcam["psOffsetTime"] = psOffsetTime;
    	// <--
    
    	self thread respawn();
    }
    So then i did if the scorelimit was reached, then it will call a other thread, not level thread endMap(); .

    Code:
    checkScoreLimit()
    {
    	waittillframeend;
    
    	if(level.scorelimit <= 0)
    		return;
    
    	if(getTeamScore("allies") < level.scorelimit && getTeamScore("axis") < level.scorelimit)
    		return;
    
    	if(level.mapended)
    		return;
    	level.mapended = true;
    
    	level thread beforeEnd(); // Here was level thread endMap();
    }
    So now will called the beforeEnd() thread. Here i mad a mini pause and will inform the team, who has win and los.

    Code:
    beforeEnd()
    {
    
    	game["state"] = "intermission";
    	level notify("intermission");
    
    	alliedscore = getTeamScore("allies");
    	axisscore = getTeamScore("axis");
    	
    	level playSound("end");
    
    	players = getentarray("player", "classname");
    	for(i = 0; i < players.size; i++)
    	{
    		if(alliedscore == axisscore)
    		{
    			players[i] freezeControls(true);
    			players[i] thread createD();
    			wait 0.4;
    			players[i] thread createR();
    			wait 0.4;
    			players[i] thread createA();
    			wait 0.4;
    			players[i] thread createW2();
    		}
    		else if(alliedscore < axisscore) //axis won
    		{
    			if(players[i].pers["team"] == "axis")
    			{
    				players[i] freezeControls(true);
    				players[i] thread createW();
    				wait 0.4;
    				players[i] thread createI();
    				wait 0.4;
    				players[i] thread createN();
    			}
    			else if(players[i].pers["team"] == "allies")
    			{
    				players[i] freezeControls(true);
    				players[i] thread createL();
    				wait 0.4;
    				players[i] thread createO();
    				wait 0.4;
    				players[i] thread createS();
    				wait 0.4;
    				players[i] thread createE();
    			}
    			else //spectator
    			{
    				players[i] iprintlnbold("The Team Axis won!");
    				players[i] freezeControls(true);
    			}
    		}
    		else if(alliedscore > axisscore) //allies won
    		{
    			if(players[i].pers["team"] == "axis")
    			{
    				players[i] freezeControls(true);
    				players[i] thread createL();
    				wait 0.4;
    				players[i] thread createO();
    				wait 0.4;
    				players[i] thread createS();
    				wait 0.4;
    				players[i] thread createE();
    			}
    			else if(players[i].pers["team"] == "allies")
    			{
    				players[i] freezeControls(true);
    				players[i] thread createW();
    				wait 0.4;
    				players[i] thread createI();
    				wait 0.4;
    				players[i] thread createN();
    			}
    			else //spectator
    			{
    				players[i] iprintlnbold("The Team Allies won!");
    				players[i] freezeControls(true);
    			}
    		}
    	}
    	wait(4);
    	thread lastkc(); //Last Killcam <--
    }
    So if you see the script, then you will see Win, or Lose or Draw. You will be frozed. After the froze, 4 secounds later, it will call the lastkc() thread.

    Code:
    lastkc()
    {
    	wait 0.1;
    	if (isDefined(level.lastkillcam))
    	{
    		players = getEntArray("player", "classname");
    		for (i = 0; i < players.size; i++)
    		{
    		wait 2;
    		players[i].kc_skiptext setText(&"");
    		players[i].kc_title setText(&"Last Killcam");
    			players[i] thread maps\mp\gametypes\_killcam::killcam(level.lastkillcam["attackernum"], level.lastkillcam["delay"], level.lastkillcam["psOffsetTime"]);
    		}
    		wait 10;
    		level thread endMap();
    	}
    	else
    	
    	wait 10;
    	level thread endMap();
    
    }
    Its almost finished. There is a bug in lastkc() , that will show what he did the last 7 secounds, but there should come how he killed him.

    So it will show, the last 7 secounds what he did, before the lastkc() was called.

    But it should show HOW he killed him (how normal killcams).

    The Killcam is already to showing all.

    If someone know what to do, please reply and thank you!!

  5. #5
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Merged same question here
    timescale 0.01

  6. #6
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Dude, there is an easy fix for this.
    Its the offsettime or smthing.

    Make your own calculations using gettime() when a playe rhas been killed, then you'll be fine...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •