• 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.

Need help with a combo trigger.

Status
Not open for further replies.
Level 7
Joined
Nov 13, 2007
Messages
244
Well what this is supposed to do is some sort of combo.

I cast attack1, then attack2 adds to my spells and replaces attack1 you have 1 second to cast attack2 or it resets back to attack1 1,then when I use attack2, attack3 adds and replaces attack2 I have 1 second to cast attack1 or it resets to attack1, if attack3 is casted then it just resets to attack1 again.

Here is my current trigger but it doesnt work, btw MUI help would be welcome.

  • Attack
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Attack
    • Actions
      • Set CasterPoint = (Position of (Triggering unit))
      • Set DamagePoint = (CasterPoint offset by 100.00 towards (Facing of (Triggering unit)) degrees)
      • Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 40.00 at DamagePoint, dealing 5.00 damage of attack type Spells and damage type Normal
      • Unit - Remove Attack from (Triggering unit)
      • Unit - Add Attack 2 to (Triggering unit)
      • Trigger - Turn on Attack 2 <gen>
      • Wait 1.00 seconds
      • Unit - Remove Attack 2 from (Triggering unit)
      • Custom script: call RemoveLocation(udg_CasterPoint)
      • Custom script: call RemoveLocation(udg_DamagePoint)
  • Attack 2
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Attack 2
    • Actions
      • Set CasterPoint = (Position of (Triggering unit))
      • Set DamagePoint = (CasterPoint offset by 100.00 towards (Facing of (Triggering unit)) degrees)
      • Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 40.00 at DamagePoint, dealing 7.00 damage of attack type Spells and damage type Normal
      • Sound - Stop (Last played sound) After fading
      • Unit - Remove Attack 2 from (Triggering unit)
      • Unit - Add Attack 3 to (Triggering unit)
      • Trigger - Turn on Attack 3 <gen>
      • Wait 1.00 seconds
      • Unit - Remove Attack 3 from (Triggering unit)
      • Custom script: call RemoveLocation(udg_CasterPoint)
      • Custom script: call RemoveLocation(udg_DamagePoint)
  • Attack 3
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Attack 3
    • Actions
      • Set CasterPoint = (Position of (Triggering unit))
      • Set DamagePoint = (CasterPoint offset by 100.00 towards (Facing of (Triggering unit)) degrees)
      • Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 40.00 at DamagePoint, dealing 10.00 damage of attack type Spells and damage type Normal
      • Sound - Stop (Last played sound) After fading
      • Unit - Remove Attack 3 from (Triggering unit)
      • Trigger - Turn on Attack <gen>
      • Wait 1.00 seconds
      • Unit - Add Attack to (Triggering unit)
      • Custom script: call RemoveLocation(udg_CasterPoint)
      • Custom script: call RemoveLocation(udg_DamagePoint)
 
Level 15
Joined
Dec 18, 2007
Messages
1,098
Try giving the hero a buff that lasts 1 second when he casts the spell and remove that buff and give the attack 3 buff etc.
Then, you check which buff the hero has a run the correct trigger.
For example, you cast attack 1, you gain a buff Attack which lasts 1 second. Then, you check if you have that buff when you casts Attack and if you do, run Attack 2 trigger or use an IF/THEN/ELSE or whatever.
You should probably create the spell based off whatever and get a dummy unit to cast it. Just change the level of the spell based on which Combo you are at.
To detect the level of the buff, I could probably create a simple custom script for you to detect it with ease.
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
I am not near my pc (where I have JASSCraft), so I will just explain things you have to do:

JASS:
function trigger takes nothing returns nothing
if you cast attack 2 then
          - get attached timer
          - destroy timer
endunction

function timerexpired takes nothing returns nothing
         -get unit attached to timer
         -remove both attack 1 and 2
         -add attack 1
endfunction

function actions takes nothing returns nothing
-attack detected
if you cast = attack 1 then
         -remove attack 1
         -add attack 2
if you cast = attack 2 then
         -remove attack 2
         -add attack 3
-create timer
-attach unit to timer (HandleVars), 1.00 period, one shot
if you cast attack 2 then
         - make trigger which fires if attack 3 is casted 
         - attach timer to trigger
endfunction

In fact, it is quite simple to make and is MUI.
 
Status
Not open for further replies.
Top