Generating Gold For an Ally

Dymetreus

New Member
Reaction score
1
So I made my own custom AI's (Demon race and Troll for those who's curious) and I made how the Demon's generate gold is by units being slain. While the Trolls generate gold through me and Player2, however I have been unable to find out how we would accomplish this. I plan on making us gaining gold by slaying the enemy, along with neutral monsters. (Two hero map, no buildings except for a revive on OUR side. Trolls build buildings and the Demons do though) Right now I'm looking at Actions - Divert Income to Player trigger, thinking it may help. Though I don't think it will.

I hope someone can assist me. Thanks for anyone's help on the matter.
 

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
Well, if you have an action that you think may/may not work, then try it out, only way to see if it does or doesn't work.
 

afisakov

You can change this now in User CP.
Reaction score
37
One way of making it for the demons
Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Killing unit)) Equal to Player 4 (Purple)
    • Actions
      • Player - Add 200 to Player 4 (Purple) Current gold

of course to do it properly I would need to know what u mean by
the Demon's generate gold is by units being slain.
the conditions would have to reflect if u want it when the demons kill a unit, or when a demon dies, or when a hero dies, or simply when anyone on the map gets killed.
You can use if/then/else functions to vary the amount given based on unit properties like who owns it or whether it is a hero.
 

afisakov

You can change this now in User CP.
Reaction score
37
One way of making it for the demons
Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Killing unit)) Equal to Player 4 (Purple)
    • Actions
      • Player - Add 200 to Player 4 (Purple) Current gold

of course to do it properly I would need to know what u mean by
the Demon's generate gold is by units being slain.
the conditions would have to reflect if u want it when the demons kill a unit, or when a demon dies, or when a hero dies, or simply when anyone on the map gets killed.
You can use if/then/else functions to vary the amount given based on unit properties like who owns it or whether it is a hero.
 

Dymetreus

New Member
Reaction score
1
One way of making it for the demons
Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Killing unit)) Equal to Player 4 (Purple)
    • Actions
      • Player - Add 200 to Player 4 (Purple) Current gold

of course to do it properly I would need to know what u mean by
the conditions would have to reflect if u want it when the demons kill a unit, or when a demon dies, or when a hero dies, or simply when anyone on the map gets killed.
You can use if/then/else functions to vary the amount given based on unit properties like who owns it or whether it is a hero.

The Demons aren't the concern. I actually use that trigger, (a bit opposite tbh, instead of Equal to Purple, it's false to the demons) for the demons, but the only concern is how the Trolls generate gold.

I want them to generate gold by every time I earn gold, they get per say, 50% of that I earn. Which is by killing neutral monsters, or any for that matter. It forces/encourages the player to kill enemies quicker, so that the Trolls defend themselves long enough for the player(s) to make it to the Trolls to defend, and defeat the Demons.
 

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
Trigger:
  • Untitled Trigger 001
    • Events
      • Map Init
    • Conditions
    • Actions
      • Player - Divert 50% of the Gold income of Player 1 (Red) to Player 2 (Blue)
      • Player - Divert 50% of the Gold income of Player 3 (Teal) to Player 2 (Blue) (Player 2 is the trolls, Player's 1 and 3 are the players playing)
Try something along those lines
 

Dymetreus

New Member
Reaction score
1
Trigger:
  • Untitled Trigger 001
    • Events
      • Map Init
    • Conditions
    • Actions
      • Player - Divert 50% of the Gold income of Player 1 (Red) to Player 2 (Blue)
      • Player - Divert 50% of the Gold income of Player 3 (Teal) to Player 2 (Blue) (Player 2 is the trolls, Player's 1 and 3 are the players playing)
Try something along those lines

That doesn't seem to effect it, unfortunately. I'm guessing that's gold you lose from your tax, (having too high of a population, so you get less gold) but I tried it, and nothing happened.
 

afisakov

You can change this now in User CP.
Reaction score
37
say, 50% of that I earn. Which is by killing neutral monsters
as long as most of ur gold is by killing enemy monsters and the purpose is that
It forces/encourages the player to kill enemies quicker
You can do this with
Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Owner of (Killing unit)) Equal to Player 1 (Red)
          • (Owner of (Killing unit)) Equal to Player 2 (Blue)
    • Actions
      • Player - Add (Point-value of (Unit-type of (Triggering unit))) to Player 3 (Teal) Current gold

Just set the "point-value" of the units to half their average bounty in object editor and replace Player 3 teal with whatever player ur trolls are set to.
If ur players can gain gold in a way other than slaying enemies u will have to make a separate trigger to share that with the trolls.
 

Dymetreus

New Member
Reaction score
1
as long as most of ur gold is by killing enemy monsters and the purpose is that

You can do this with
Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Owner of (Killing unit)) Equal to Player 1 (Red)
          • (Owner of (Killing unit)) Equal to Player 2 (Blue)
    • Actions
      • Player - Add (Point-value of (Unit-type of (Triggering unit))) to Player 3 (Teal) Current gold

Just set the "point-value" of the units to half their average bounty in object editor and replace Player 3 teal with whatever player ur trolls are set to.
If ur players can gain gold in a way other than slaying enemies u will have to make a separate trigger to share that with the trolls.

That sounds like what I was looking for, thanks! I'll give it a shot and tell you how it goes. It's working out well! Thank you so much for this, for awhile I thought it would be impossible to end up doing it the way I wanted to, I'm very appreciative for your effort.
 
General chit-chat
Help Users

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top