Steal Gold

makakai

New Member
Reaction score
1
Hey I was wondering how i would make a unit steal gold from other players resource pools from a set building.

(It needs to be not noticeable unless they can see the gold disappearing or see the unit as it is a shade which is invisible)

Any ideas? :)
 

sentrywiz

New Member
Reaction score
25
What do you mean by set building? Do you mean it has to steal gold by "thieving" from a structure, building?
 

Bogrim

y hello thar
Reaction score
154
That depends on how you want the unit to "steal" from the target. Do you want attacks and the damage caused to determine the theft, or some sort of ability which will either steal an amount instantaneously or "drain" gold over time? You have to be more specific for us to give you trigger advice.
 

makakai

New Member
Reaction score
1
I need it to be like how gold and lumber workers keep at it collecting then returning to a building preferably 5 gold instantly then return
and not detected unless they see the gold disappearing or see the unit.

What ever is easiest really
 

Moridin

Snow Leopard
Reaction score
144
Something like this might work:
Note: Freehand

Trigger:
  • Steal Gold
    • Events
      • Periodic Event - Every 1.00 second of game time
    • Conditions
    • Actions
      • Set Temp_Group = (All units of type (Town hall)) within (playable map area)
      • Unit Group - Pick all units in Temp_Group and do (multiple actions)
        • Loop - Actions
          • Set Current_unit = Picked unit
          • Set Temp_Group_2 = (All units within 800 of (Picked unit)) matching ((Unit-type of matching unit) Equal to Shade)
          • If (multiple conditions are true) then do (then actions) else do (else actions)
            • If - conditions
              • (Temp_Group_2 is empty) Not Equal to True ->Boolean condition
            • Then - Actions
              • Unit Group - Pick all units in Temp_Group_2 and do (multiple actions)
                • loop - Actions
                  • Player - Set Current gold for (Owner of (Current unit)) to (Current gold - 10)
                  • Player - Set Current gold for (Owner of (Picked unit)) to (Current gold + 10)
              • Custom script: call DestroyGroup (udg_Temp_Group_2)
            • Else - Actions
              • Custom script: call DestroyGroup (udg_Temp_Group_2)
      • Custom script: call DestroyGroup (udg_Temp_Group)
 

makakai

New Member
Reaction score
1
Works Great apart from one minor fault which is that needs to stop when they don't have gold :p but perfect otherwise :)

Edit* Now fixed it myself by a simple condition checking that the gold is greater or equal to 10 thanks :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top