• 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] Gold when attack

Status
Not open for further replies.
  • Trigger
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units in (Playable Map Area)) and do (Actions)
      • Loop - Actions
        • Trigger - Add to Trigger3 <gen> the event (Unit - (Picked unit) takes damage)
  • Trigger2
  • Events
    • Unit - A unit enters (Playable Map Area)
  • Conditions
  • Actions
    • Trigger - Add to Trigger3 <gen> the event (Unit - (Triggering unit) takes damage)
  • Trigger3
  • Events
  • Conditions
  • Actions
    • Player - Add (Real(Damage Dealt)) to (Owner of (Damage source)) Current gold
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Not necessarily. Depending on what you're using it for you are able to detect any change in a player's gold/lumber, so in some cases it may be easier to do it this way. There is no real down-side to using a damage detection engine either, though, if it's going to be included in the map then it might as well be used for this so that there is record of exactly how much gold was obtained, and other data that you cannot reference from event responses.
 
Status
Not open for further replies.
Top