• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Spell] Damage Spell!

Status
Not open for further replies.
Level 14
Joined
Nov 17, 2010
Messages
1,265
  • Example Trigger
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Your_Abiltiy
    • Actions
      • Set Your_Unit = (Triggering unit)
      • Set Your_Target = (Target unit of ability being cast)
      • Unit - Cause Your_Unit to damage Your_Target, dealing (Real((Strength of Your_Unit (Include bonuses)))) damage of attack type Spells and damage type Normal
The tricky part is that you have to convert a real into an integer to use the attribute bonus. So when you are inputting the damage you need to find Conversion - Convert Integer to Real. This will show you Real (Point-value of footman) just change point-value of footman to the hero attribute you want. You can also make this arithmethic. (1.00 + 1.00) just change the values to whatever you want. For instance you can make it (5.00 x Real(Strength of Hero))
 
Level 4
Joined
May 27, 2014
Messages
65
Unit - Cause Your_Unit to damage Your_Target, dealing (Real((Strength of Your_Unit (Include bonuses)))) damage of attack type Spells and damage type Normal-------
I don't know how to make this? Can you tell me..
 
Level 14
Joined
Nov 17, 2010
Messages
1,265
Unit - Cause Your_Unit to damage Your_Target, dealing (Real((Strength of Your_Unit (Include bonuses)))) damage of attack type Spells and damage type Normal-------
I don't know how to make this? Can you tell me..

I'll try to explain this step by step. Hopefully this will give you an idea about how the trigger editor works. I will warn you that things can get much more complicated so your best bet is to look at tutorials and just try things out for yourself.

1. Open trigger editor
2. Create a new action
3. Make a 'Unit' action type
4. Scroll down until you see 'Damage Target'
5. Fill in where it says (Triggering Unit) with your caster variable and target variable respectively.
6. Click where it says 500.00
(If you don't want it to be calculated mathematically then skip 7 - 10. Arithmetic just allows you to input a number of different values and either add, subtract, multiply, or divide them)
7. Go to function and select 'Arithmetic'
8. Click the first 1.00 and input any value you would like - it could be a number or if you want it to be the level of the ability you are using you can go to Function and scroll down to 'Conversion - Convert Integer to Real' (This allows you to input an integer into a real number's place)
9. Now it says Real((Point-value of Footman)) - click on Point-value of Footman. Scroll down to Unit - Level of Ability for Unit. Now just fill in the correct ability and the caster variable.
10. Click OK until you are back to where it says (Real((Level of Your_Ability for (Your_Caster)))) + 1.00
11. Click on the 1.00 (or 500.00 if you skipped 7 - 10) and scroll down to the function that says 'Conversion - Convert Integer to Real'
12. Now when you click on Point-value of Footman you scroll up to where it says Hero - Hero Attribute
13. Choose the attribute you want, fill in your caster for the Hero, choose whether you want to include or exclude bonuses.
14. Click OK until you are back to the trigger editor
15. You can also change the damage type and attack type if you wish.

I hope this is clear now. Hopefully this will get you going on learning about the ins and outs of the trigger editor. There really is a lot of things you can do. Here is a link to some other tutorials
 
Level 14
Joined
Nov 17, 2010
Messages
1,265
For this you would need to set the unit's life. You would need to calculate the current life of the unit and add the amount you would like healed.

Example:
  • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + 50.00)
This is another Arithmetic trigger. In the equation, to find 'life of (triggering unit)' you will need to look for Unit - Property
 
Level 14
Joined
Nov 17, 2010
Messages
1,265
You could do a unit classification check to see what type of unit you cast it on. Then you can use an if/then/else function to determine whether to damage or heal the unit
 
Status
Not open for further replies.
Top