• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Spell] Double spell

Status
Not open for further replies.
Level 7
Joined
Sep 3, 2020
Messages
191
Hello,

First of all, forgive me for my kinda basic english.
I'm not using Triggers at all, in case that I would try to use as much as I can the already made spells for my map (I don't need big effect on my spells, so, plus, I don't understand anything about triggers even after trying 2-3 times to learn :( ).

Here is my problem. I would like to use 2 times the custom spell "inner fire", one that will give damages and other one that will give armor (2 differents blessing). Other spells that decreases armor and where I should use negative value are already taken (or attack). Thing is, if I make those 2 custom spells, then I'm adding them to my unit/hero, when he'll cast the second spell, it'll launch the first one instead of the second. Any way to modify this without triggers ? :)

Thanks to any answer :)
 
Level 24
Joined
Jun 26, 2020
Messages
1,853
Hello,

First of all, forgive me for my kinda basic english.
I'm not using Triggers at all, in case that I would try to use as much as I can the already made spells for my map (I don't need big effect on my spells, so, plus, I don't understand anything about triggers even after trying 2-3 times to learn :( ).

Here is my problem. I would like to use 2 times the custom spell "inner fire", one that will give damages and other one that will give armor (2 differents blessing). Other spells that decreases armor and where I should use negative value are already taken (or attack). Thing is, if I make those 2 custom spells, then I'm adding them to my unit/hero, when he'll cast the second spell, it'll launch the first one instead of the second. Any way to modify this without triggers ? :)

Thanks to any answer :)
I don't know if this is already solved in recent versions (maybe changing the ID), but no, you can't create more than 1 spells based in the same ability to the same unit, because what you mentioned happens, you have to create one of that abilities based in another ability.
 
Level 12
Joined
Feb 5, 2018
Messages
521
There are lots of basic tutorials here at the hiveworkshop. Triggers are your friends, the object editor only gets you to a certain point.
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,583
Okidoki :) Thanks for the answer sir, I do appreciate o/ Will try to find some solutions with this :)
This is very easy to do with basic triggers and a Dummy unit.

Inner Fire that adds armor:
  • Cast Inner Fire Armor
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Inner Fire Armor (Hero)
    • Actions
      • Set VariableSet TempPoint = (Position of (Target unit of ability being cast))
      • Unit - Create 1 Dummy for (Triggering player) at TempPoint facing Default building facing degrees
      • Unit - Add Inner Fire Armor (Dummy) to (Last created unit)
      • Unit - Order (Last created unit) to Human Priest - Inner Fire (Target unit of ability being cast)
      • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_TempPoint)
Inner Fire that adds damage:
  • Cast Inner Fire Damage
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Inner Fire Damage (Hero)
    • Actions
      • Set VariableSet TempPoint = (Position of (Target unit of ability being cast))
      • Unit - Create 1 Dummy for (Triggering player) at TempPoint facing Default building facing degrees
      • Unit - Add Inner Fire Damage (Dummy) to (Last created unit)
      • Unit - Order (Last created unit) to Human Priest - Inner Fire (Target unit of ability being cast)
      • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_TempPoint)
So the Hero uses the (Hero) version of Inner Fire. This ability is based on Channel and has no effects besides running the trigger associated with it. It's also used for the Icon, Tooltip, Cooldown, etc... Channel is a fully customizable ability that has many more options than your standard ability. A unit can have as many of these abilities as you want as long as they have different Base Order Ids, which you can adjust yourself.

Then you have the actual Inner Fire abilities. These are based on Inner Fire and have the armor/damage bonus effects. These abilities are going to be cast by our Dummy unit.

So what's going on:
-The Hero casts Inner Fire Armor on a target unit.
-The Cast Inner Fire Armor trigger runs.
-This trigger creates a Dummy unit, which is an invisible and uncommandable (outside of triggers) unit that's used to cast spells and do other neat things.
-We add the associated Inner Fire ability to the Dummy unit.
-We order the Dummy unit to cast this newly added ability on our target.
-We add an expiration timer to our Dummy unit, causing it to be removed after 0.50 seconds. We don't need to keep the Dummy unit around after we're done with it.

TempPoint is a Point variable that is used to clean up a memory leak. This helps with game performance. Read more about leaks with the link in my signature "Things that Leak".
 

Attachments

  • Inner Fire Example 1.w3m
    18.7 KB · Views: 11
Last edited:
Level 24
Joined
Jun 26, 2020
Messages
1,853
This is very easy to do with basic triggers and a Dummy unit.

Inner Fire that adds armor:
  • Cast Inner Fire Armor
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Inner Fire Armor (Hero)
    • Actions
      • Set VariableSet TempPoint = (Position of (Target unit of ability being cast))
      • Unit - Create 1 Dummy for (Triggering player) at TempPoint facing Default building facing degrees
      • Unit - Add Inner Fire Armor (Dummy) to (Last created unit)
      • Unit - Order (Last created unit) to Human Priest - Inner Fire (Target unit of ability being cast)
      • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_TempPoint)
Inner Fire that adds damage:
  • Cast Inner Fire Damage
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Inner Fire Damage (Hero)
    • Actions
      • Set VariableSet TempPoint = (Position of (Target unit of ability being cast))
      • Unit - Create 1 Dummy for (Triggering player) at TempPoint facing Default building facing degrees
      • Unit - Add Inner Fire Damage (Dummy) to (Last created unit)
      • Unit - Order (Last created unit) to Human Priest - Inner Fire (Target unit of ability being cast)
      • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_TempPoint)
Triggering Player? Was not "Owner of Triggering unit"?
 
Level 7
Joined
Sep 3, 2020
Messages
191
Thanks a lot to all of you guys, Im gonna use all you said to me and try to learn some basics triggers then :) Thanks thanks!
 
Status
Not open for further replies.
Top