• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How to detect a source which increases player gold or lumber?

Level 5
Joined
May 10, 2024
Messages
57
I want a few bases with individual economy assigned to one player.

Red player base 1
Red player base 2 (works like Player 2)
Red player base 3 (works like Player 3)

Each base has economy specific variables like:
integer base1Gold
integer base1Lumber
integer base2Gold
integer base2Lumber

When player resources is changed I want to detect which worker/hero/unit/structure contribute to that change.
Who returned resources from gold mine or tree?
Who sold or bought something?
Who started or cancelled an upgrade?
 
Top