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.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top