• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Assist System in GUI

Status
Not open for further replies.
Level 12
Joined
May 16, 2020
Messages
660
Hi guys,

I searched for an Assist system similarly to DotA / LoL, but found only this one which is completely in JASS: Advanced Streak System v5.1.1.0

This is what should happen upon killing an enemy hero:
  • Allies of the killer who helped kill the enemy hero (except player 1 and 7) get X gold of the bounty (+"assist")
  • Dealing damage, targeting the enemy with a debuff or targeting the allied killer with a buff within 10 seconds of the kill counts as assist
  • Ideally all units which assisted are in some kind of group when the kill happens, so that I can call them for a string message.
This will almost certainly require some sort of hashtable, but when I started thinking about the details I had no idea how to make a functioning system for this.

Many thanks!


***
This is what I created before creating this request. While working on it I realized though that I will need different Counter [CV] each time a unit cast a spell on a different ally... and this is where I have no idea how to proceed:

  • Kill Streak Assist Damage
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • (DamageEventSource belongs to an enemy of (Owner of DamageEventTarget).) Equal to True
    • Actions
  • Kill Streak Assist Spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Player number of (Owner of (Triggering unit))) Greater than 0
      • (Player number of (Owner of (Triggering unit))) Less than or equal to 12
      • (Triggering unit) Not equal to (Target unit of ability being cast)
    • Actions
      • Set VariableSet KA_AssistCaster = (Triggering unit)
      • Set VariableSet KA_AssistTarget = (Target unit of ability being cast)
      • Set VariableSet KA_CV = (Custom value of KA_AssistTarget)
      • Set VariableSet KA_AssistCounter[KA_CV] = 0
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (KA_AssistCaster is in KA_AssistGroup.) Equal to False
        • Then - Actions
          • Unit Group - Add KA_AssistCaster to KA_AssistGroup
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (KA_AssistCaster belongs to an enemy of (Owner of KA_AssistTarget).) Equal to True
        • Then - Actions
          • -------- CASTED SOME SORT OF DEBUFF ON ENEMY --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (KA_AssistCaster is in KA_AssistGroupDying[KA_CV].) Equal to False
            • Then - Actions
              • Unit Group - Add KA_AssistCaster to KA_AssistGroupDying[KA_CV]
            • Else - Actions
        • Else - Actions
          • -------- CASTED SOME SORT OF BUFF ON ALLY --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (KA_AssistCaster is in KA_AssistGroupKiller[KA_CV].) Equal to False
            • Then - Actions
              • Unit Group - Add KA_AssistCaster to KA_AssistGroupKiller[KA_CV]
            • Else - Actions
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Kill Streak Assist Loop <gen> is on) Equal to False
        • Then - Actions
          • Countdown Timer - Start KA_AssistTimer as a Repeating timer that will expire in 1.00 seconds
          • Trigger - Turn on Kill Streak Assist Loop <gen>
        • Else - Actions
  • Kill Streak Assist Loop
    • Events
      • Time - KA_AssistTimer expires
    • Conditions
    • Actions
 
Status
Not open for further replies.
Top