• 🏆 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!

[Trigger] Need help on a combo system

Status
Not open for further replies.
Level 10
Joined
Sep 3, 2009
Messages
458
Well here I am again needing some help. I'm making a combo system that when X unit successfully damages Y unit three times, there is a Z% chance X unit will either:

A. Rapid Combo Finish:

X unit will have increased attack speed for 1.50 seconds. After that Y unit will be knocked back.

B. Charge Combo Finish:

X unit will wait for 1 second then unleash a powerful blow on Y unit, knocking it back.

But the problem is I'm having trouble, when determining Y unit takes damage from X unit.

Here's the trigger:

Unit is Attacked
  • Rapid
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set RapidComboUnit = (Attacking unit)
      • Set RapidComboTarget = (Attacked unit)
      • Set RapidComboPoint = (Position of RapidComboTarget)
Takes Damage/Combo Finish/Loop
  • Rapid Copy
    • Events
      • Unit - No unit Takes damage
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RapidComboTarget Equal to No unit
          • (Damage source) Equal to RapidComboUnit
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RapidComboCounter Greater than or equal to 3
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Random integer number between 1 and 100) Less than or equal to 100
                • Then - Actions
                  • Unit - Add a 1.00 second Generic expiration timer to RapidComboDummy
                  • Set RapidComboCounter = 0
                  • Unit - Create 1 Dummy Unit for (Owner of RapidComboUnit) at RapidComboPoint facing Default building facing degrees
                  • Set RapidComboDummy = (Last created unit)
                  • Unit - Add a 1.00 second Generic expiration timer to RapidComboDummy
                  • Unit - Add Bloodlust (Rapid Combo) to RapidComboDummy
                  • Unit - Order RapidComboDummy to Orc Shaman - Bloodlust RapidComboUnit
                  • Trigger - Turn off (This trigger)
                  • Trigger - Turn off Rapid <gen>
                  • Trigger - Run Rapid Copy Copy <gen> (ignoring conditions)
                • Else - Actions
                  • Set RapidComboCounter = 0
            • Else - Actions
              • Set RapidComboCounter = (RapidComboCounter + 1)
        • Else - Actions
CoolDown?
  • Rapid Copy Copy
    • Events
    • Conditions
    • Actions
      • Wait 2.00 seconds
      • Trigger - Turn on Rapid <gen>
      • Trigger - Turn on Rapid Copy <gen>
So~ can anyone help? As you can see it's not MUI(Still learning to make it MUI) and I have a locLeak but I can fix that later.
 
Level 5
Joined
Dec 18, 2007
Messages
205
in the attacked function, you must add an event to the other trigger:
"RapidComboTarget takes damage"

then in the other trigger in the conditions you must use
"RapidComboTarget Equal to triggering unit"
instead of
" RapidComboTarget Equal to No unit"

the condition "(Random integer number between 1 and 100) Less than or equal to 100" is useless, because the condition will ALWAYS be true, so you can just skip it.

greetings
 
Level 10
Joined
Sep 3, 2009
Messages
458
"No unit" doesn't work.

well I finally figured that out XD but thanks

in the attacked function, you must add an event to the other trigger:
"RapidComboTarget takes damage"

then in the other trigger in the conditions you must use
"RapidComboTarget Equal to triggering unit"
instead of
" RapidComboTarget Equal to No unit"

the condition "(Random integer number between 1 and 100) Less than or equal to 100" is useless, because the condition will ALWAYS be true, so you can just skip it.

greetings

Wow +rep Thanks for he help. I'm kinda new with those kinds of triggering so again thanks for your help.

P.S. the 'Random Integer', I set it ti less than or equal to 100 to test if the trigger really works. There will be actually be a 50%(could change) chance to Rapid Attack/Charge Attack.
 
Level 5
Joined
Dec 18, 2007
Messages
205
P.S. the 'Random Integer', I set it ti less than or equal to 100 to test if the trigger really works. There will be actually be a 50%(could change) chance to Rapid Attack/Charge Attack.

yeah ok, already thought, that you wanted to change it anyways.
everything is working now?
 
Status
Not open for further replies.
Top