Tower Defense: Unit Health Issue

Danis[h]

New Member
Reaction score
19
Greetings. I've been working on and off on my tower defense for a while now, and I've been postponing this particular issue since I've yet to find a viable solution to my problem.

The Issue:
I am spawning my monsters from a random spawn table rather than in a set order. This means that I cannot set their hit points in the object editor, but have to modify it in-game.
I need a viable method of increasing a unit's health by f(x)=3x^2+22 every round so that the monsters at round 1 will have 25 hit points, 34 at round 2, 47 at round 3, 70 at round 4 and so on

So far I've based my units off of heroes and then modified their strength every round to match the hit points by the amount dictated by the function / (formula?)

Is there a solution to my problem, or is the method I am currently using viable? if it is not, why not?


Any Ideas, suggestions or comments would be greatly appreciated.
 

Danis[h]

New Member
Reaction score
19
I've stumbled on an issue after some further testing. It would seem this system is not MUI when I spawn my units continuously. I'm currently trying on my own to work around the issue, but I would appreciate some help, if there is anyone out there who could offer it.


Was previously:
Tested and works like a charm! Thank you most Kindly!

This will help you modify the HP in-game. Shouldn't be too tough to apply it to your map. Implement your formula along with the snippet.

Looks interesting, thank you.
 

MateoSoetsu

New Member
Reaction score
9
What exactly is the problem? You said it is a continuous spawn so instead of waves you mean that mobs keep coming every second for a duration of time and when the time is over they increase in hp and/or other stats? I assume if that is the case and there is no time inbetween rounds that there could be enemies from two different waves on the board at the same time.

Are the units the exact same unit in the object editor or are they different on different waves? Is the HP increase change on different waves or is that to change different difficulty levels at the beginning of the game?

Perhaps you could give every unit spawned an ability that did nothing except keep track of the wave in which they came from. Then every 0.5 or 1 second you could have a periodic event that increased all units on the map with a certain level of the ability to the desired amount of HP. idk if that is where your MUI problem came from or not, maybe the system just isn't fast enough? It seemed to work fine MUI in Tom Jones' test map.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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