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

Trigger Damage Spell Help

Status
Not open for further replies.
Level 4
Joined
Jul 11, 2015
Messages
58
I added a new spell to the Soldier hero in the map but this one was triggered not jass and the damage deal is like this:



How do i make the damage dealt like jass in the trigger

return 1680 + level * 1680.

(Damage base + (1680 damage each level of the spell))
 
Level 4
Joined
Jul 11, 2015
Messages
58
Level 24
Joined
Aug 1, 2013
Messages
4,658
First, please explain what you want to do.
There are two problems that I can see.
1. You dont know how you can make the calculations in GUI.
2. You dont know how you can deal damage in GUI.

For 1,
When you are selecting a real or an integer, you will see this screen:
luHzyTg.png


Under the "Function:" box, you can find the option "Arithmetic".
This option will give you a math function of 2 other reals/integers.
You can choose between +, -, * and /.
There are other options for maths under "Maths - ..." inside that same function box.

When you need 3 reals combined together, you have to make an Arithmetic inside one of the two reals given by the first Arithmetic.

In your case, you also want to use the level of an ability in your damage calculation.
This is an integer and your damage has to be a real.
So you will have to convert an integer to a real using the option "Convert Integer to Real" in the functions box.
There you can select "Level of ability for unit" to get the level.

In your case, you want to do:
( Base<1680> + ( Scaling<1680> * ( IntegerToReal( LevelOfAbility ) ) ) )

For 2,
Create a new action for "Unit - Damage target".
In that one, you can apply your damage to the target.
 
Level 4
Joined
Jul 11, 2015
Messages
58
First, please explain what you want to do.
There are two problems that I can see.
1. You dont know how you can make the calculations in GUI.
2. You dont know how you can deal damage in GUI.

For 1,
When you are selecting a real or an integer, you will see this screen:
luHzyTg.png


Under the "Function:" box, you can find the option "Arithmetic".
This option will give you a math function of 2 other reals/integers.
You can choose between +, -, * and /.
There are other options for maths under "Maths - ..." inside that same function box.

When you need 3 reals combined together, you have to make an Arithmetic inside one of the two reals given by the first Arithmetic.

In your case, you also want to use the level of an ability in your damage calculation.
This is an integer and your damage has to be a real.
So you will have to convert an integer to a real using the option "Convert Integer to Real" in the functions box.
There you can select "Level of ability for unit" to get the level.

In your case, you want to do:
( Base<1680> + ( Scaling<1680> * ( IntegerToReal( LevelOfAbility ) ) ) )

For 2,
Create a new action for "Unit - Damage target".
In that one, you can apply your damage to the target.

i didn't get it
 
Aithmetaic is calculation of 2 parameters in GUI.

Arithmetic(x,y).
x and y are fields where you can enter values/variables/functions/presets.

For x you use your base damage, 100 for example. (field: value)
For y you can use "LevelOfAbilityForUnit". (field: function)

->
Arithmetic(100, LevelOfAbilityForUnit)
and for calculation you choose multiplier "*".
 
Status
Not open for further replies.
Top