• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

General questions regarding a spell

Status
Not open for further replies.
Level 14
Joined
Aug 8, 2010
Messages
1,021
Hi! I want to ask how i can destroy the auto casting option of ability (like inner fire) and make it cast manually. Also i want to ask how i can make an spell with no target, i mean with a target - the caster only. Example for spell with target - Frost armor (you can choose to what unit you can cast the spell). Example for spell with no target - Divine shield (when you use the spell, you automatically cast it on yourself). +rep 4 reward!
 

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
1) You have to trigger that ability.
Use one of abilities that are no-autocast but are Target abilities (like chain lightning/storm bolt), and do:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) equal to Your_ability
  • Actions
    • Unit - Create 1 dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
    • Unit - Order (Last created unit) to Human Priest - Inner Fire (Target unit of ability being cast)
    • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
2) to make ability only castable on self see Object Editor -> abilities, enter your ability and see field Stats - Allowed Targets. Choose Self only.
However, if you want frost armor acts like divine shield you also have to trigger it. Best to base your spell on Channel ability, choosing in it's data target type - instant (no target)
And now we do similar thing:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) equal to Your_ability
  • Actions
    • Unit - Create 1 dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
    • Unit - Order (Last created unit) to Undead Lich - Frost Armor (Target unit of ability being cast)
    • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
 
Status
Not open for further replies.
Top