 |
Lain Novice
Joined: 26 Oct 2001 Posts: 38
|
Posted: Wed Apr 30, 2003 11:40 pm
Health messages |
How could I check if @hp is below a percentage of @maxhp but above a percentage of @maxhp?
I'm trying to send a message to the window if my health gets relatively low, and another message if it gets extremely low.
If I just use @maxhp/2 then the first message will be sent regardless of whether it is below the amount for the second message. I looked through and tried some expressions but I couldn't work out "lower then but higher then".
Pattern: Hp~: (&hp) ~((&maxhp)~) Gp~: (&gp) ~((&maxgp)~) Xp: (&xp)
Lain |
|
|
 |
TonDiening GURU

Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Thu May 01, 2003 4:13 am |
Change the thresholds, but this concept would work:
#IF (%eval(@Hp*100/@HpMax) < 50) {#SH HEALTH %if(%eval(@Hp*100/@HpMax) < 30,LOW,EXTREMELY LOW)}
Ton Diening |
|
|
 |
Lain Novice
Joined: 26 Oct 2001 Posts: 38
|
Posted: Thu May 01, 2003 7:23 am |
Thank you Ton,
It seems I had to swap the 'low, extremely low' around, aside from that it does exactly what I was looking for.
Lain |
|
|
 |
|
|