• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

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

Status
Not open for further replies.
Level 18
Joined
Oct 18, 2007
Messages
929
: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.
 
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)
 
@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 ">"
 
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.
Back
Top