Tutorial Custom Kill/Point Streak Function
#1
I want to show u, how to create a fully custom Kill or Point Streak Function, with fully custom Streaks, which will be saved and can be started even if u were killed. So...like the real ones.

You have to decide, if you want to write in your .gsc File or you want to create a new one just for the Functions.

1. If you have decided to write it in an existing .gsc skip this step!
At first download this clean .gsc File >>CLICK<<

2. Define in your .gsc a new Variable. This is going to be your current streak. Lets call it self.TestStreak. And you need a variable, that tells you how much streakrewards you got already. Define it on onPlayerConnect.

Code:
onPlayerConnect() { for( ; ; ) { level waittill( "connected", player ); player.TestStreak = 0; player.hasCurrentStreak = 0; player thread onPlayerSpawned(); } }

3. Now you have to define, where you want self.TestStreak to increase. For example if you just want normal Kilstreaks, just write self.TestStreak+=1; on OnPlayerKilled(). If you want Pointstreaks (like MW3 :O) just write that whereever you want. For example for game objectives or whatever.

4. Next we have to create a function, which gives you a specific Kill- PointStreak:

Code:
giveCustomStreak(streakname,streak) { self.setPointStreak[streak] = streakname; }

This Function defines an array variable with the number of the needed streaks and the name, which streakreward you get.

5. Now you need to create a function, which checks if your current Streak (so the self.TestStreak variable) is defined:

Code:
checkCustomStreak() { num = self.TestStreak; if(isDefined(self.setPointStreak[num])) self threadgetCustomStreak(self.setPointStreak[num]); }

So this function checks if a streakreward is defined at your current streak.
If it is true, it starts a function, at which we will look now.
You just have to put this check function next to your self.TestStreak increase.

6. At next we have to create a function, that gives you the killstreak you earn:

Code:
getCustomStreak(streakname) { self.hasCurrentStreaks+=1; self.hasStreak[self.hasCurrentStreaks] = streakname; }

As you can see, it defines a new array variable with the number of the current streakrewards you have with the entity of the streakrewardname.

7. At last we need a function to play those custom streakrewards (orly?) Place this on OnPlayerConnect()

Code:
playPS() { self endon("disconnect"); for( ; ; ) { if(self UseButtonPressed()) //is wayne what button you want { num = self.hasCurrentStreaks; streak = self.hasStreak[num]; if(num != 0 && isDefined(num) && isDefined(streak)) { if(streak == "<some shitty name1>") {self thread shitty();} else if(streak == "<some shitty name2>") {self thread shitty2;} self.hasCurrentStreaks-=1; self.hasStreak[num] = undefined; wait 2; } num = undefined; streak = undefined; } wait 0.01; } }

Well...here we define the Button which you have to press to start the Streakreward. AND you have to define, which customstreak should start when the streakname is however. Yess, now its your turn to create custom Streaks and be awesome Fuck yea!

Now you can just add custom streaks for someone with giveCustomStreak()

I hope this is helpful and not too bad!

[Image: ctoc.jpg]
Reply

#2
gj bro
Black Ops Mods:

RPG(rocket launcher) mod
Get the Specials

Old aliasses:

eliteCVDelite
CVD

Reply

#3
Could be more organized, but still nice.
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#4
damned. forgot something to say:
if you want to delete a streakreward, just use this

Code:
self.setPointStreak[streak] = undefined;

or create a ew fucntion for it.
[Image: ctoc.jpg]
Reply

#5
what happens in SnD on next round??
Reply

#6
(09-06-2011, 18:41)rotceh_dnih Wrote: what happens in SnD on next round??

y not?
when not
just add self.pers i think
[Image: ctoc.jpg]
Reply

#7
(09-06-2011, 18:50)Tomsen1410 Wrote: self endon("disconnet");

nice typo :Awesome:
edit: I like it, it's sad no-one has the balls to create a tutorial on how to create a killstreak the 3arc way, it's kinda like the medals and isn't that hard
I got school right now so can't create it right now, itsmods y u no do it for me?
Reply

#8
(09-07-2011, 15:41)jariz Wrote:
(09-06-2011, 18:50)Tomsen1410 Wrote: self endon("disconnet");

nice typo :Awesome:
edit: I like it, it's sad no-one has the balls to create a tutorial on how to create a killstreak the 3arc way, it's kinda like the medals and isn't that hard
I got school right now so can't create it right now, itsmods y u no do it for me?

damned : P
[Image: ctoc.jpg]
Reply

#9
Wink 
Hello, Nice mod.

I am Very new to this and i need MAJOR help lol im not to smart in this stuff.

I downloaded the file and opened it with note pad? Im not sure if i was supposed to do that but now im confused on how to do the rest Please help me Thanks

I also have teamviewer if you want to connect to me and help me that way

Thanks.. Smile
Reply

#10
(12-01-2011, 00:04)darshin145 Wrote: Hello, Nice mod.

I am Very new to this and i need MAJOR help lol im not to smart in this stuff.

I downloaded the file and opened it with note pad? Im not sure if i was supposed to do that but now im confused on how to do the rest Please help me Thanks

I also have teamviewer if you want to connect to me and help me that way

Thanks.. Smile

This is a tutorial on how to create your own killstreaks for modders with basic GSC skill,
Please check out this: http://www.itsmods.com/forum/Thread-Tuto...mmies.html
And come back here when you actually understand this
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help Sentry Gun kill = Player kill Snake 8 8,238 11-07-2013, 13:41
Last Post: Nekochan
  Help Help Function Fire dargula 1 3,162 10-31-2013, 23:03
Last Post: Nekochan
  Black Ops 2 Custom background? jotape99 10 18,201 10-29-2013, 07:22
Last Post: xInfinity.
  !kill Plugin Hallla 1 3,498 09-07-2013, 22:30
Last Post: axel-le-meilleur
  Custom xanims DidUknowiPwn 8 9,740 08-28-2013, 08:17
Last Post: RaZ
Question Help Upgrade my point system from files to Database, help? EnVi Sweden Rocks 11 12,196 08-03-2013, 23:31
Last Post: EnVi Sweden Rocks
  Help About kill cam Howl3r 3 3,856 08-03-2013, 03:57
Last Post: Howl3r
  Help Make ac130 shoot custom bullets Ra3shed 0 3,644 07-23-2013, 13:02
Last Post: Ra3shed
  [Tutorial] Custom gametype HUD iAegle 17 20,512 07-14-2013, 01:16
Last Post: Nekochan
Video Custom Facepaints? Cuddlyedits 5 6,876 07-01-2013, 14:58
Last Post: iPaddie

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.