• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

K, i suck at math so here is the QUESTION :|

Status
Not open for further replies.
Level 18
Joined
Oct 18, 2007
Messages
930
:ash:Ok im making a heal spell so i realy need this :p.

Ok we have 3 values

V1 = The Casters MAX HP Value
v2 = The Targets MAX HP Value
v3 = The current HP Value of the Target

So how do i solve this that i always get a value that comes up in v2 and v3??

Like you heal 3000
your targets MAX health is 800
and its current health is 100

The result will be 700, but how do i solve this??? :p any ideas??

:cexc:AND YES I SUCK AT MATH :):cexc:
 
:ash:Ok im making a heal spell so i realy need this :p.

Ok we have 3 values

V1 = The Casters MAX HP Value
v2 = The Targets MAX HP Value
v3 = The current HP Value of the Target

So how do i solve this that i always get a value that comes up in v2 and v3??

Like you heal 3000
your targets MAX health is 800
and its current health is 100

The result will be 700, but how do i solve this??? :p any ideas??

:cexc:AND YES I SUCK AT MATH :):cexc:

~:bored: Anyone??

Do not double-post! Especially within 15 minutes of eachother. You can't expect replies immediately.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Not really :D
Use the Math's function Min(or whatever):
The minimal of (The amount you can heal, Target's Max health - target's current health)
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
@GhostWolf
HappyTauren did not answer the question...
@Element of Water
That is exactly what I proposed would do, but you have a small mistake: the "<" should be ">"
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
v1 = heal (what you had here made no sense)
v2 = The Targets MAX HP Value
v3 = The current HP Value of the Target

So how do i solve this that i always get a value that comes up in v2 and v3??

Like you heal 3000
your targets MAX health is 800
and its current health is 100

The result will be 700, but how do i solve this??? :p any ideas??

MIN(v1,v2-v3)
 
Status
Not open for further replies.
Top