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

this trigger i want unit to attack not attacked :S

Status
Not open for further replies.
Level 19
Joined
Feb 15, 2008
Messages
2,184
ok here is the trigger dudes...

  • Bladestorm learn
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Attacking unit) Equal to BladestormNight_Caster
      • (Learned Hero Skill) Equal to BladestormNight
    • Actions
      • Trigger - Turn on Bladestorm <gen>
and go to this trigger
  • Bladestorm
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of BladestormNight for (Attacked unit)) Greater than 0
    • Actions
      • Trigger - Turn off (This trigger)
      • Set BS_caster = (Triggering unit)
      • Unit - Add Bladestorm 1 to BS_caster
      • Unit - Order BS_caster to Orc Blademaster - Bladestorm
      • Wait 2.50 seconds
      • Unit - Remove Bladestorm 1 from BS_caster
      • Set BS_caster = No unit
      • Trigger - Turn on (This trigger)
but instead of attacking unit i want to this....

when unit attacking then turn on this tirgger :)

if u know what i mean :)
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Remove this line from the first trigger:
(Attacking unit) Equal to BladestormNight_Caster
 
Level 16
Joined
Sep 26, 2005
Messages
1,088
And the one you're looking for should look like this:
  • Bladestorm
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of BladestormNight for (Attacking unit)) Greater than 0
    • Actions
      • Trigger - Turn off (This trigger)
      • Set BS_caster = (Attacking unit)
      • Unit - Add Bladestorm 1 to BS_caster
      • Unit - Order BS_caster to Orc Blademaster - Bladestorm
      • Wait 2.50 seconds
      • Unit - Remove Bladestorm 1 from BS_caster
      • Set BS_caster = No unit
      • Trigger - Turn on (This trigger)
 
Level 16
Joined
Sep 26, 2005
Messages
1,088
Try like this:
  • Bladestorm
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of BladestormNight for (Attacking unit)) Greater than 0
    • Actions
      • Trigger - Turn off (This trigger)
      • Unit - Add Bladestorm 1 to Attacking Unit
      • Unit - Order Attacking Unit to Orc Blademaster - Bladestorm
      • Wait 2.50 seconds
      • Unit - Remove Bladestorm 1 from Attacking Unit
      • Trigger - Turn on (This trigger)
also make sure cooldown for Bladestorm 1 is 0, mana cost 0 and duration 2.5 seconds
also make sure it's not hero ability
 
Level 21
Joined
Aug 9, 2006
Messages
2,384
Lol, leaks are caused by uncleaned variables or un-stored unit calls (like attacking unit), they take a space in the ram and are not cleaned, so they cause lag after a time, you clean a unit variable with setting it to no unit, a group in GUI needs to be cleared through a function, a location needs to be removed with call RemoveLocation(udg_locationname) and such.
 
Level 16
Joined
Sep 26, 2005
Messages
1,088
ye ye... i know; to fix it use this trigger:
  • Bladestorm
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of BladestormNight for (Attacking unit)) Greater than 0
    • Actions
      • Trigger - Turn off (This trigger)
      • Set CastingHero = (Attacking Unit)
      • Unit - Add Bladestorm 1 to CastingHero
      • Unit - Order CastingHero to Orc Blademaster - Bladestorm
      • Wait 2.50 seconds
      • Unit - Remove Bladestorm 1 from CastingHero
      • Set CastingHero = No unit
      • Trigger - Turn on (This trigger)
 
Status
Not open for further replies.
Top