• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] Need Jass,VJass Streak system

Status
Not open for further replies.
Level 2
Joined
Dec 7, 2009
Messages
9
Hi guys ...
As im not good in vjass or jass and im just founded a gui streak system (like the one in dota ) i thought i ask u guys =)
Does anyone knows a good streak system... it must be compatible with this assistent system ; assist
I hope anyone knows a good system easy to configure for a gui coder =)
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
What do you mean by a "streak" system? Like a system that counts how many consecutive kills each player's hero has? There is hardly a need for a system its just a matter of integer arrays. If you want to record a player's total kills you can have one integer array, and if you want to record a player's "spree" then you could use a different one. The array index you use would be the same as the player's ID, so you can cross reference.

Other than that all of the actions are performed on "Unit - A unit dies". If a player's hero dies, you would reset the "spree" back to 0.
 
Level 2
Joined
Dec 7, 2009
Messages
9
I know how to do it in gui ^^
But i need a killing streak/sound system in jass/vjass.
A system like the one in dota wich count the kills of a hero and after a streak of 2 its double kill etc...
 
Level 7
Joined
Mar 6, 2006
Messages
282
I've never played dota, but heres something I came up with.

2 Variables
OnAMultiKill[], array boolean
MultiKill[], array integer


Event:
Unit Dies

Condition:
Killing Unit Not Equal to No Unit

Actions:
If OnAMultiKill[player number of (owner of killing unit)] = false then
Set MultiKill[player number of (owner of killing unit)] = 0
EndIf
Set MultiKill[player number of (owner of killing unit)] = MultiKill[player number of (owner of killing unit)] + 1
If OnAMultiKill[player number of (owner of killing unit)] = false then
Set OnAMultiKill[player number of (owner of killing unit)] = true
Wait 0.5 seconds
Set OnAMultiKill[player number of (owner of killing unit)] = false
If MultiKill[player number of (owner of killing unit)] = 2 then
Game text message: "DOUBLE KILL!!!"
Else
If MultiKill[player number of (owner of killing unit)] = 3 then
Game text message: "TRIPLE KILL!!!"
EndIf
EndIf
EndIf


Basically just checks to see how many kills you got within 0.5 seconds of getting your initial kill, and then declares it a double kill, or a triple.

You might be looking for a more advanced trigger that adds more wait time to check for more kills, depending if you get consecutive kills within an allotted time period. If so, then I just gave you an idea.
 
Level 9
Joined
Nov 28, 2008
Messages
704
Not getting the point of having a system like this. Just track their kills in an int array or something. Then have another array tracking their streak kills. Make that go to 0 every time they die.

System done.
 
Level 13
Joined
Mar 16, 2008
Messages
941
The "biggest" problem of this is (if it's realy meant to bo like dota or even like the original Unreal) that a spree lasts until you die.
Multikills have some sort of duration. If you didn't kill a unit for example for 10 seconds, your spree still lasts but your kill-chain brakes.
Either you need a timer for each unit or a timer to loop
through the arrays.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Justify said:
Multikills have some sort of duration

If a hero kills another hero then start a timer. If the same hero kills another hero before the timer has expired, then restart the timer and do it again until the hero stops getting kills.

This is separate from the streak/total kills arrays. You would still have to determine how long you want the game to run in-between kills before ending the "spree".

Oh I guess Justify sums it up.
 
Level 2
Joined
Dec 7, 2009
Messages
9
I could make one in vJass.

Can you make one for me pls ?

And yes... it should have sprees included like double,trible kill.
That means it must have a timer wich starts @ every kill and count 10 sec..
If you got another kill in these 10 sec. then you get a double kill etc. .

@ Berbanog: if you can make one in jass then pls make the message wich display with every kill like : player% kill player% for : & gold . configurable. i have to turn it of because these messages are included in the assistant system.
The only need is the message and sound generation for double,trible kills,Monsterkill godlike etc. =)
I hope you can do this .
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
If you're using GUI then I'll just make the foundation, integrate it so you can use GUI with it, and then you can do the specifics. There will be specific triggers that are called in the system (that I'll include in the map) that you can do your own actions in.

Do you have variables that save the value of the hero-unit? Do all players only have 1 hero at a time?
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
The majority of it is the variable arrays. Once you've got those set up it took me like 20 minutes to make a working one. I'm going to post it up soon. To be honest I think that this was a petty request, it shows you've done absolutely nothing to try and do this yourself. Not everybody is going to be as nice as me (and I'm not going to keep making these kinds of things) so you're going to have to learn how to solve the simpler things yourself; this being one of them.

As of now, the code automatically assumes each player will only ever have one hero. I've uploaded the map.

You can put whatever code you want in the "OnDoubleKill", "OnTripleKill", and "OnMultiKill" fields. They are evaluated (conditions) and then executed (actions) before being run, so if you want to add conditions you can do that too, but I don't imagine they'll be necessary.

You can use event responses, for instance if you want to use (Get triggering unit) in your GUI code, it will reference the correct unit (triggering unit being the one dying).
 

Attachments

  • KillTrackerSystem.w3x
    19.8 KB · Views: 55
Last edited:
Level 13
Joined
Mar 16, 2008
Messages
941
I still don't get why you need a "system" for this. It would be what, max 20 lines of code?

Please, write ma a 20-line "system" of this.
Keep mind that streaks last until the hero dies,
sprees last, lets say, 10 seconds and it should be fully MUI.

Then you'd just have the detection, not even the possibility
of doing stuff after streaks.
He asked for a system, so let him ask -.-
 
Level 2
Joined
Dec 7, 2009
Messages
9
...it shows you've done absolutely nothing to try and do this yourself

First : thx allot for this system... It helps me allot
Sec. : I for nowe dont have enough time for learning jass or vjass... dont eaven know the difference.
I can make this system in gui but i want to make a fast and smoothie running map without any leak or wath ever =)
I will learn rly much from your system ... and i will learn jass soon =)
So again thx for the system
 
Status
Not open for further replies.
Top