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

[Trigger] Help me with trigger! plz

Status
Not open for further replies.
Level 2
Joined
Jul 23, 2008
Messages
11
Please, could someone tell me how to do trigger like this; When unit attacks, attacking unit will lose amount of mana.

I hope you understand what i mean... Im not so good with triggers... PLZ ANSWER :cry:
 
Level 20
Joined
Jan 6, 2008
Messages
2,627
Variables= Temp Group, Unit Group

  • Pick All
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set TempGroup = (Units in (Playable map area))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Trigger - Add to Loose Mana when Attacked <gen> the event (Unit - (Picked unit) Is attacked)
      • Custom script: call DestroyGroup(udg_TempGroup)
  • Entering
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • Trigger - Add to Loose Mana when Attacked <gen> the event (Unit - (Entering unit) Is attacked)
  • Loose Mana when Attacked
    • Events
    • Conditions
    • Actions
      • Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) - 15.00)
 

Attachments

  • UnitLooseMan.w3x
    16.5 KB · Views: 40
Status
Not open for further replies.
Top