Net worth like in Element TD?

Ouguiya

New Member
Reaction score
11
Hello all again!

As all you good Element TD fans (such as my humble self) out there will know, there is a multiboard in Element TD which keeps track of how much money the player has earned in total throughout the game.

I would love to be able to use something similar (a money-made-tracking) system inside my map, but unfortunatly, no matter how much I looked around the trigger actions, I couldn't find anything which would allow me to get the bounty which a unit gave when it was killed (as this is more or less random).

My question is, how to make such a system efficiently enough so it can easily keep track of 12 players, even after around 1500 kills, without lagging, and how to do it that it represents an exact value, not just an estimate.

Thanks in advance!

Yours,

Ouguiya
 

foodflare

You can change this now in User CP.
Reaction score
32
have a variable for their net worth and for their current gold and have the trigger check when a unit is killed and have their current minus the variable current and add that to the net worth then set the current gold variable to the current gold

or you could have a timer that does the same thing
 

Faust

You can change this now in User CP.
Reaction score
123
I think you probably should just trigger the whole bounty system, so you can track it.
 

Nivius

TH.net Regular
Reaction score
5
Code:
map start:
set goldbefore to start_gold_a_player_starts_whit
set totalgoldearned to start_gold_a_player_starts_whit

when gold is gained
set goldnow to your current gold
set goldgained to goldnow-goldbefore
set totalgoldearned to totalgoldearned+goldgained
set goldbefore to goldnow
thats the idea, kinda what i whud do

player starts whit 200 gold, he earns 5 gold then use 100 gold and gain 5 more, and then 120 more

the stats of the variables whud be:
goldnow: 230
goldbefore: 110
goldgained: 120
totalgoldearned: 330
 
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