Equation for AoE

TheOverWhelm

Member
Reaction score
16
I was messing around with my map when I noticed that my AoE equation thing was wrong.
My friend gave it to me when I was talking about it and said some things about how a teacher was instructing about it and the concepts were the same.

JASS:
function AoEEffect takes real AoE, real Distance, real MaxDam, real MinDam returns real
    return ((Distance/AoE)*(MaxDam-MinDam)+MinDam)
endfunction

I messed with it and now it's wrong, it gives negative numbers and I know I'm calling it right (checked everything in Notepad too to make sure I'm calling it right)
I can't think of what to do for this equation, I could preload an older version but even then that equation was messed up at time, such as the damage near the border would end up negative to the point of -2000 or lower for when the spell does 500.
Anyone have any ideas? Am I even posting in the right section? Is there a math concept section? o_O
 

TheOverWhelm

Member
Reaction score
16
El Bump
Edit: After some messing around with a calculator I've decided that a Y=(MX^(-1))*M may be an effective equation, I would just need to detect if the Y is greater then Max or less then Min. But the issue occurs, the higher the number gets the farther out the maxdam will be. M as a 500, the maxdam would be 500 but the "Maxdam area" would be out at the range of 500, so messing around some more doing a Y=(MX^(-1))*(M/Q) comes into mind, but what would Q represent? A "called" variable to addin?
Any thoughts?
 

Bogrim

y hello thar
Reaction score
154
I don't understand what you are trying to accomplish with this equation. Please try and describe the purpose first.
 

TheOverWhelm

Member
Reaction score
16
An area of effect for damage follow a MaxDam (basically giving the equation the most damage it is allowed to use) and the MinDam (the least damage).
It effectively works, since after I posted the topic >_>
Instead of using a single formula I just used one and added several checks afterwards which wasn't what I was looking for, but effectively works.
Basically, it's solved.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top