I've been trying to solve an little stumbling block i've had with my combat log and i'm hoping someone can provide some advice on how to overcome this.
To give you an idea of what i'm trying to achieve, here's some wonderfully pre-alpha shots and the events.
Firstly upon loading, the textbox asks you to hit Spawn to spawn a random mob. Once you click this it then tells you what mob you've spawned:
For this particular part you then press basicAttack(testAttack). This takes the mob health i've pushed from a static mob array to a temporary mob array tempMob.At(0), and then I subtract a random number from your characters min and max attack stat array "- round(random(aCharH.At(4),aCharH.At(5)))"
This is fine and dandy and does what it's supposed to. However I would like it display the value of - round(random(aCharH.At(4),aCharH.At(5))) and not the health remaining at tempMob.At(0). So instead of "mob is at x health":
I'd like it to say "You attack mob for x damage" or something similar. My main objective here is to get that X damage done. I've played around with a global variable to try and get the x damage done so I can easily display it, then have it subtracted from the mobs health, but I don't seem to be able to get the math nailed down.
Has anyone done something similar before? If so how did you overcome it? I feel like it's staring at me in the face and i'm too blind to see it!
Thanks for looking