Record Health Loss?
So I have a bit of a complicated question. I'm designing a robot battling game and I want to be able to determine the amount of health a bot will lose with a given hit (and also determine how much damage the bot has given when it strikes) so that in the event of a tie, a comparison can be given between each bot's damage taken and damage given. It would also allow me to trigger announcer reactions when a particularly big hit takes place. I don't see a clear way of determining a health modifier's output at the moment of giving damage or how to determine how much a health manager would lose with a given hit or even how to tally these summations throughout the match. Any suggestions on how to do this would be greatly appreciated.
To keep a running total of how much damage was taken, you could use variables pretty easily: https://www.youtube.com/playlist?list=PLX3qX-yI9vm4Dgo5NpTd0HcHYhnCJXNQA
OK, so I think I figured it out. Outputs from the health modifiers and health managers will be sent via wireless signals to a summation microchip which will tally the damage given and received for each bot so in the event of a tie, a comparison can be made between the 2 values of the 2 bots and a winner can be determined. Calculators will compare these values as well so when a particularly damaging hit occurs, the audience and announcers can react accordingly.
As for actually keeping a running tally going, that was the hard part but I should have something workable now. The tally's will be kept on individual counters. The current count output of the counter is fed into a calculator's A port. The B port will normally have a value of 0 entered into it so the count is kept constant when no damage is occurring. When damage occurs, the amount of damage will be transmitted to a receiver. This receiver feeds the damage number to the B port of the calculator, first going through a signal manipulator and a second calculator. The receiver will also send a signal to a second signal manipulator which transforms it into a pulse signal that powers the first manipulator. This is needed as if the power is on for too long, the loop between the counter and the first calculator will continually add the value. However, even with this brief signal, that loop can still run ten times (thus, if a damage amount of 10 is given to the first calculator to add to the counter's tally it actually adds 100 before the pulse signal shuts off). Thus, the second calculator divides the damage by 10 to compensate for this fact
I hope this hasn't been too confusing but I've also attached a photo of the logic to make it a little clearer. I hope this helps anyone else trying to make tallies in Dreams (though I wouldn't be surprised if there was a much simpler method)
Ok thanks TAPgiles, I didn't realize the output would carry the exact number of health or damage. That makes it easier. The last question then is just how to tally this over the course of a match so in the event of a tie, a comparison could be made between each bot's damage given and damage received summed over the course of the match. Would a calculator that would add the health modifier/health manager's output to the sum's total with the sum total being kept on a counter be the simplest way or is there another way that would be better?
I'm pretty confused about what you want to do...
You can use health managers and health modifiers to affect those. You can use the "currently losing health" output of the manager to find out how much is being subtracted, and act accordingly. Don't know if that helps? https://tapgiles.com/docs/#health-losing