Combo Key??

Icy

New Member
Reaction score
3
I have a question,
Is is possible to make a game that all the hero ability is base on combo.

example i make 3 spell using roar base id with 0.1 cool down. so when i cast these 3 spell in the correct sequences it will do different effect like, fire a fireball out, flamestike etc...

All these spell i can handle but just wonder if the system can.
Meaning like detecting which combo is been activate etc..
Also it not single hero base. the combo system should be multi-hero base.

Thanks.
 

Nenad

~Choco Coronet~ Omnomnom
Reaction score
137
I think it's very much possible. Of the top of my head i would think of making a two dimensional array with one dimension being players, and the other one a 3 string code. Then, for example if you cast 3, 2, 1 it would write down 321 in the string, then use a condition to check if the string is 3 characters of length. Then, cast out the spell.

The number of spells you can cast depends on the number of abilities you have. For example, with only 3 abilities you can cast 3! spells, or 3*2*1 = 6 spells. With 5 different abilities you can cast 5! or 5*4*3*2*1 = 120 spells.

This method might be a bit tedious though, but i'm 90% sure that it's possible in wc3 (even without JASS).
 

Happy

Well-Known Member
Reaction score
71
its possible....i use it for one of my heroes^^ but you have to use different base spells...and then do it like nenad said...write an invisible string and order it do create a dummy casting a certain spell if a certain "code" is used...

p.s. make sure that each spell has a number and you use the right number to check the string^^
 

W!†A_cRaft

Ultra Cool Member
Reaction score
28
also dont forget to clear the string periodically clear the string in order to avoid "slow combos" so to say...

I made this with GUI and without hashtables, so i know it is 100% possible, not sure if I made it MUI though, but it was MPI 100%


Use channel as a base spell
 

Icy

New Member
Reaction score
3
dun quite understand what it mean by using string code...
got any simple example to help me understand better?
 

Happy

Well-Known Member
Reaction score
71
for example....

spell 1 = A
spell 2 = B
spell 3 = C

possible combos : ABC ; BCA ; CAB ; CBA ; ACB ; BCA

spells are done on combo : ACB ; CAB ; ABC

so you have to check whether the spells are used in this orders...

so and to check it you make a string code...

means if the hero uses spell 1 the string code is A...if he uses spell 3 after using spell 1 the string is AC....i hope you understand ^.~

so and at the moment the string has a length of 3 you check whether its the right combo...means if the hero uses the spells in BCA nothing would happen but if he would use ABC a certain spell would be cast...

i hope you got it now^^
 

Icy

New Member
Reaction score
3
Nope, i understand the structure but i dun understand the part on string code in term of coding.
 

W!†A_cRaft

Ultra Cool Member
Reaction score
28
okay i will make you a simple example, you of course need to make it MPI and more complex then this:

Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Animate Dead
        • Then - Actions
          • Set combination = (combination + 1)
          • Set interval = 1.00
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Ability being cast) Equal to Battle Roar
            • Then - Actions
              • Set combination = (combination + 2)
              • Set interval = 1.00
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Ability being cast) Equal to Avatar
                • Then - Actions
                  • Set combination = (combination + 3)
                  • Set interval = 1.00
                • Else - Actions

This trigger generates a string code and resets the "combo time". it simply adds a number to the string depending on what spell you used.

Trigger:
  • Untitled Trigger 002
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Set interval = (interval - 0.10)
      • If (interval Less than or equal to 0.00) then do (Set combination = <Empty String>) else do (Do nothing)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Length of combination) Greater than or equal to 3
        • Then - Actions
          • Set combination = (Substring(combination, 1, 3))
        • Else - Actions
          • If (combination Equal to 111) then do (-------- Spell COMBO1 --------) else do (Do nothing)
          • If (combination Equal to 112) then do (-------- Spell COMBO2 --------) else do (Do nothing)
          • If (combination Equal to 113) then do (-------- Spell COMBO2 --------) else do (Do nothing)
          • If (combination Equal to 121) then do (-------- Spell COMBO4 --------) else do (Do nothing)
          • -------- and so on --------


This trigger periodically reduces the "time window" within which the player needs to use another spell in order for him to "continue" a combo, if the interval expired it resets the combination string. It also tests if the combo is already set, subtracts 3 character string in case someone spammed spells and does the needed spell combo.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top