So I'm trying to make a simple macro to change HP with no output in the chat. So far it's been going well...until I wanted to add commands to make sure the TempHP never went below -10, and not over MaxHP. In this one I've tried the -10 command first...
[TempHP]
[HPValue = HPChange]
[NewHP = max(-10, MaxHP + HPValue)]
[TempHP = NewHP]
...What am I doing wrong?
edit: Nevermind...I just had to change MaxHP to TempHP...noob mistake >.<
edit2: Okay...new problem!
[TempHP]
[HPValue = HPChange]
[NewHP = max(MaxHP, min(-10, TempHP - HPValue))]
[TempHP = NewHP]
Sorry if I seem really, really stupid...but I have next to no experience with this kind of stuff. What am I doing wrong now?
edit3: I figured it out...wow, it really helps laying it all out and disassembling everything in the macro before you put it back together.
Here's the finished macro:
[TempHP]
[HPValue = HPChange]
[NewHP = max(MaxHP, min(-10, TempHP + HPValue))]
[TempHP = NewHP]
(All I had to do was change "TempHP - HPValue" to "TempHP + HPValue")
HP changing macro
Moderators: dorpond, trevor, Azhrei
Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior.
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior.

- PyroMancer2k
- Dragon
- Posts: 925
- Joined: Thu Sep 11, 2008 2:04 pm
- lmarkus001
- Great Wyrm
- Posts: 1865
- Joined: Sat Mar 29, 2008 12:30 am
- Location: Layfayette Hill, PA
- Mr. Pokeylope
- Giant
- Posts: 118
- Joined: Mon Aug 11, 2008 9:24 pm
- Contact:
- Mr. Pokeylope
- Giant
- Posts: 118
- Joined: Mon Aug 11, 2008 9:24 pm
- Contact:
It was sent a while ago so I dont know if it will ever make it (maybe the patch was too simple
). I will resend it again.
In the meantime you can use the abort function to discard the output, its cant always be used to discard output but it can in this case.
Abort stops the macro processing at the point it is called if the argument is 0 which will discard output so if you tack an [h:abort(0)] on the end of the macro then you will get no output but everything up to that point will still run. It has to be at the end because anything after the abort will not run.

In the meantime you can use the abort function to discard the output, its cant always be used to discard output but it can in this case.
Abort stops the macro processing at the point it is called if the argument is 0 which will discard output so if you tack an [h:abort(0)] on the end of the macro then you will get no output but everything up to that point will still run. It has to be at the end because anything after the abort will not run.