Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Klllstreaks

  1. #1
    Private First Class
    Join Date
    Jul 2013
    Posts
    170
    Thanks
    44
    Thanked 16 Times in 11 Posts

    Klllstreaks

    Hey,can somebody put here some killstreaks script?
    Thanks!

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

    Please look up as first if there is already a thread about that.
    If there are not a tutorial about that, ask the question.

    Here the tutorial (Read comment from Jeplaa)
    http://killtube.org/showthread.php?9...ght=Killstreak

  3. The Following 4 Users Say Thank You to Loveboy For This Useful Post:

    Jeplaa (16th October 2013),kung foo man (15th October 2013),Rocky (15th October 2013),thOuMta (16th October 2013)

  4. #3
    Private First Class
    Join Date
    Jul 2013
    Posts
    170
    Thanks
    44
    Thanked 16 Times in 11 Posts
    erorr...i put like at post and dont work.

  5. #4
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    post the error and your script. I tjhink your level of scripting is way too low. Better start with the basics. Because this is a waste of time

  6. #5
    Private First Class
    Join Date
    Jul 2013
    Posts
    170
    Thanks
    44
    Thanked 16 Times in 11 Posts
    i'm low :P

  7. #6
    Private First Class
    Join Date
    Dec 2012
    Posts
    127
    Thanks
    132
    Thanked 114 Times in 63 Posts
    It's your lucky day.

    Here you can download "improved" version of killstreak.


    Explanation:

    _killstreak.gsc file
    Code:
    AddStreak()
    {
    	player = self;
    	killstreak = player.stats["killstreak"];
    	switch(killstreak)
    	{
    		case 3:
    			iPrintLn(player.name + " ^7is on 3 killstreak!");
    			break;
    		case 5:
    			iPrintLn(player.name + " ^7is on 5 killstreak!");
    			break;
    	}
    }
    Inside tdm.gsc file

    in Callback_PlayerKilled(...) under or above attacker.score++
    Code:
    attacker.stats["killstreak"]++;
    attacker thread maps\mp\gametypes\_killstreak::AddStreak();
    in spawnPlayer()
    Code:
    self.stats = [];
    self.stats["killstreak"] = 0;
    Enjoy.
    Last edited by Jeplaa; 16th October 2013 at 14:58.

  8. The Following 5 Users Say Thank You to Jeplaa For This Useful Post:

    kung foo man (16th October 2013),Loveboy (16th October 2013),Rocky (17th October 2013),thOuMta (16th October 2013),YuriJurek (16th October 2013)

  9. #7
    Private First Class YuriJurek's Avatar
    Join Date
    Jun 2013
    Posts
    219
    Thanks
    152
    Thanked 88 Times in 47 Posts
    Hello there, I've go just a simple question, not really related to killstreaks but it will fit in here, so why do people sometimes define something like
    PHP Code:
    player self
    Before going on here
    PHP Code:
    player self;
        
    killstreak player.stats["killstreak"]; 
    ?
    Where they could just do
    PHP Code:
    killstreak self.stats["killstreak"]; 
    I am a bit confused about it, can someone explain it for me please ?

    And one last thing, would it be ok if I make a thread in which I could post some questions as I push forward in developing my scripting skills? I mean questions about things that are obvious but I would like to know exactly what I am doing.
    Last edited by YuriJurek; 16th October 2013 at 21:27.

  10. #8
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    you need help with ks ? i can help you
    Xf : czolk

  11. #9
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by YuriJurek View Post
    Hello there, I've go just a simple question, not really related to killstreaks but it will fit in here, so why do people sometimes define something like Before going on here ?
    Where they could just do
    PHP Code:
    killstreak self.stats["killstreak"]; 
    I am a bit confused about it, can someone explain it for me please ?

    And one last thing, would it be ok if I make a thread in which I could post some questions as I push forward in developing my scripting skills? I mean questions about things that are obvious but I would like to know exactly what I am doing.
    A lot of people do it. Even Infinity Ward developers. Here is the stock maps\mp\gametypes\_healthoverlay.gsc:

    PHP Code:
    playerBreathingSound(healthcap)
    {
        
    self endon("end_healthregen");
        
        
    wait (2);
        
    player self;
        for (;;)
        {
            
    wait (0.2);
            if (
    player.health <= 0)
                return;
                
            
    // Player still has a lot of health so no breathing sound
            
    if (player.health >= healthcap)
                continue;
                
            
    player playLocalSound("breathing_hurt");
            
    wait .784;
            
    wait (0.1 randomfloat (0.8));
        }

    I personally never do it, because, as you say, it just seems wrong somehow.

  12. The Following 2 Users Say Thank You to Tally For This Useful Post:

    Jeplaa (17th October 2013),YuriJurek (17th October 2013)

  13. #10
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Quote Originally Posted by YuriJurek View Post
    And one last thing, would it be ok if I make a thread in which I could post some questions as I push forward in developing my scripting skills? I mean questions about things that are obvious but I would like to know exactly what I am doing.
    Ofcourse thats ok

  14. The Following User Says Thank You to Ni3ls For This Useful Post:

    YuriJurek (17th October 2013)

Posting Permissions

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