[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
 
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.
Back
Top