• 🏆 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] Income Trigger

Status
Not open for further replies.
Level 4
Joined
Jul 22, 2012
Messages
72
Ok So I made a map And Just need a trigger to have a Control point that Is brought down to 0 health and then becomes the player's that killed it, and generates (Number of gold) per 60 Secs.
 
Level 4
Joined
Jul 14, 2012
Messages
100
So heres a simple income that gives 10 gold per footman every 60 seconds.

  • Income
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Set AllPlayers = (All players)
      • Player Group - Pick every player in AllPlayers and do (Actions)
        • Loop - Actions
          • Player - Add ((Number of living Footman units owned by (Picked player)) x 10) to (Picked player) Current gold
      • Custom script: call DestroyForce (udg_AllPlayers)
If you want to make a unit change ownership, you can try this:

  • Change ownership
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set TempLoc = (Position of (Dying unit))
      • Unit - Create 1 (Unit-type of (Dying unit)) for (Owner of (Killing unit)) at TempLoc facing Default building facing degrees
      • Custom script: call RemoveLocation (udg_TempLoc)
However a unit who is killed actually dies with this, and a new unit of the same type is simply created for the killer, so you will still see the death animation of a "conquered" unit.
 
Status
Not open for further replies.
Top