• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Trigger - when unit enters gold mine/deposits gold

Status
Not open for further replies.
Level 3
Joined
Feb 27, 2011
Messages
39
I Really need help with this one. How to make an event - unit enters gold mine, or player gains +10gold, or unit deposits gold to a castle like structure?
Basically i want a structure to gain mana after a unit has done one gold mining trip.
thanks
 
  • Order
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
    • Actions
      • Custom script: if GetIssuedOrderId() == 852017 then
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Key load) is stored as a Handle of (Key (Triggering unit)) in Hash) Equal to False
        • Then - Actions
          • Hashtable - Save Handle Of(Target unit of issued order) as (Key load) of (Key (Triggering unit)) in Hash
        • Else - Actions
      • Custom script: elseif GetIssuedOrderId() == 852018 then
      • Set LoadStructure = (Load (Key load) of (Key (Triggering unit)) in Hash)
      • Unit - Set mana of LoadStructure to ((Mana of LoadStructure) + 10.00)
      • Custom script: endif
 

Attachments

  • Mana resource.w3x
    16.9 KB · Views: 44
Status
Not open for further replies.
Top