• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Combo Trigger Probleme

Status
Not open for further replies.
Level 1
Joined
Oct 10, 2008
Messages
4
my trigger is when a unit attackz(hero) a unit it come up with combo1 but on 2nd attack combo2 then 3 4 and 5 but for some reseon it all goes at once here s my terrgerS

  • actions a unit is attacked
  • conditions- attacking unit is = to HERO
  • actions- disable trigger combo 2
    • -disable trigger combo 3
    • -disable trigger combo 4
    • -disable trigger combo 5
    • -activate trigger combo 2
    • -create floating unit at attacking unit COMBO 1
combo 2
  • actions- a unit is attack
  • condtions- attacking unit is= to HERO
  • actions- create floating text above attacking unit combo2
  • actions- disable this trigger activate combo 3

combo 3
  • actions- a unit is attack
  • condtions- attacking unit is= to HERO
  • actions- create floating text above attacking unit combo2
  • actions- disable this trigger activate combo 4

combo 4
  • actions- a unit is attack
  • condtions- attacking unit is= to HERO
  • actions- create floating text above attacking unit combo2
  • actions- disable this trigger activate combo 5

combo 5
  • actions- a unit is attack
  • condtions- attacking unit is= to HERO
  • actions- create floating text above attacking unit combo2
  • actions- disable this trigger activate combo 1
and yes i do have that fade time age of expiration ect
 
Level 2
Joined
Feb 1, 2009
Messages
11
Alternative Idea

You'll need two variables. The first being an integer and the second being a unit group.

When the first blow hits, you check to see if the unit is in the unit-group. If it isn't (which it wont be), you add that unit to the group, and set your integer at 1.

Another blow hits, you check again to see if it's the same unit. If it is, you increase that integer by 1. If it's someone else, you clear the unit group, add the new unit to the group, and set the integer at 1.

If you reach the end of your combo cycle, you can set your system to cycle back to 0 (because the first blow will increase it to 1).

After each blow, you set up an if/then/else system that determines what number the integer is. If integer = 1, run trigger combo a. If integer = 2, run trigger combo b. etc.

I've not got the world editor open at the moment, but if you cannot make sense of this, I'll get a system going on my side and post the codes to you.
 
Level 2
Joined
Feb 1, 2009
Messages
11
I've had a go at making a system like this, but failed. There doesn't seem to be an event for when a unit attacks (only when a unit is attacked). ... and I've just now thought of a solution.

Throw in a condition that the attacking unit = your hero. I'll have another go at it and see what I can come up with.
 
Level 2
Joined
Feb 1, 2009
Messages
11
Okey, I've done it :)
  • Combo Counter
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Attacking unit) Equal to Player1Unit
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Equal to (Random unit from ComboGroup)
        • Then - Actions
          • Set ComboInteger = (ComboInteger + 1)
          • If (ComboInteger Equal to 6) then do (Set ComboInteger = 5) else do (Do nothing)
        • Else - Actions
          • Unit Group - Remove all units from ComboGroup
          • Unit Group - Add (Triggering unit) to ComboGroup
          • Set ComboInteger = 1
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ComboInteger Equal to 1
        • Then - Actions
          • Quest - Display to (All players) the Quest Update message: Combo 1 Active
        • Else - Actions
          • Do nothing
So you have your two variables; one an integer, the other a unit group. On each attack, it checks to see if you're attacking the same unit. If you are, it increases the combo integer. If it's a new unit, it starts the combo integer again, clears the unit group, and adds the new unit to the group.

The last section is for the effect you want. I've set it to display an alert (only the first combo hit is listed). You simply repeat the if/then/else section and change the "If - Conditions: ComboInteger Equal to X" for each combo sequence you wanted to add. If you wanted more than 5, you'll also need to increase the "If (ComboInteger Equal to 6) then do (Set ComboInteger = 5)" figures.

Oh, and you'll also need to store your hero unit in a unit variable as well. I've set the hero in a straight unit variable, and the enemy unit in a unit group variable (but I'm sure you could get away with a straight unit variable for both).

Let me know how things turn out for you.
 
Status
Not open for further replies.
Top