• 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.

[Solved] How can i make this formula

Status
Not open for further replies.
Level 18
Joined
Jun 2, 2009
Messages
1,233
Hero deals 0.5x/1.0x/1.5x/2.0x agility damage.

I cannot create this formula. I will be happy if someone can help me. I need template.

I forgot to mention.

Skill level 1: 0.5x
Skill level 2: 1.0x
Skill level 3: 1.5x
Skill level 4: 2.0x
 
Last edited:
Level 30
Joined
Aug 29, 2012
Messages
1,383
  • Set VariableSet Real = ((Real((Agility of YourHero (Include bonuses)))) x 0.50)
Damage is expressed in real numbers, so in order to use an integer, you simply need to tell the game to convert it with this function

1690837510143.png
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,871
Multiply the Level by 0.5. Then Multiply the Agility by that value.

Break it up using variables if that helps:
  • Set Lvl = (Real(Level of (Ability being cast)))
  • Set LvlDmg = (0.50 x Lvl)
  • Set Agi = (Real(Agility of (Casting unit) include bonuses))
  • Set FinalDmg = (Agi x LvlDmg)
Like others have said you need to convert the Integers into Reals since the Damage is a Real. All of these variables are Reals.
 
Last edited:
Level 18
Joined
Jun 2, 2009
Messages
1,233
I have the feeling that this problem is more complex that it seems, because this guy has a lot of time in the forum and is asking an apparent very simple question.
It is not very simple to me. My math is horrible and i am a stupid person.

@Uncle I was used to doing this like this
  • Unit - Cause Hero_ArcaneMistress to damage (Picked unit), dealing (50.00 + ((Real((Level of Arcane Explosion // for Hero_ArcaneMistress))) x 50.00)) damage of attack type Chaos and damage type Unknown
This is why i am so confused about it. I was tried to make it something like this and failed many times. This is why i have created this one.
Thank you for your help
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,871
So this line here:
  • (50.00 + ((Real((Level of Arcane Explosion // for Hero_ArcaneMistress))) x 50.00)
Says 50 + 50/100/150/200 etc...

We can change it to this for your Agility damage:
  • (0.50 x ((Real((Level of YourAbility // for YourHero))) x (Real(Agility of YourHero include bonuses)))
It's pretty much the same, we just change the + to an x (addition to multiplication) and the last 50.00 to be your Agility, but remember you need to convert Agility to a Real like you're doing with the Level. Also, make sure that you multiply the Level by 0.50 and not the Agility by 0.50

Here's some pictures that may help, I did it a little different than my above example but it's the same outcome.

Step 1, use Arithmetic twice to get this setup:
Arithmetic1.png

Step 2, change the first 1.00 to Agility:
Arithmetic2.png

Step 3, change the next 1.00 to 0.50:
Arithmetic3.png

Step 4, change the last 1.00 to the Level of the ability:
Arithmetic4.png

Of course you should change Avatar and (Triggering unit) to your Ability/Unit.
 
Last edited:
Level 18
Joined
Jun 2, 2009
Messages
1,233
So this line here:
  • (50.00 + ((Real((Level of Arcane Explosion // for Hero_ArcaneMistress))) x 50.00)
Says 50 + 50/100/150/200 etc...

We can change it to this for your Agility damage:
  • (0.50 x ((Real((Level of YourAbility // for YourHero))) x (Real(Agility of YourHero include bonuses)))
It's pretty much the same, we just change the + to an x (addition to multiplication) and the last 50.00 to be your Agility, but remember you need to convert Agility to a Real like you're doing with the Level. Also, make sure that you multiply the Level by 0.50 and not the Agility by 0.50

Here's some pictures that may help, I did it a little different that my above example but it's the same outcome.

Step 1, use Arithmetic twice to get this setup:
View attachment 442101
Step 2, change the first 1.00 to Agility:
View attachment 442102
Step 3, change the next 1.00 to 0.50:
View attachment 442103
Step 4, change the last 1.00 to the Level of the ability:
View attachment 442104
Of course you should change Avatar and (Triggering unit) to your Ability/Unit.
I was already implemented your previous method but thank you so much for your explanation. Still i don't know when the open and close brackets. This is amazing explanation.
 
Status
Not open for further replies.
Top