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

Little help with one complicated spell

Status
Not open for further replies.
Level 12
Joined
Mar 26, 2005
Messages
790
So i managed to make one "simple" spell. It contains from three parts

part one-it makes all your friendly-player's heroes invisible (based on ghost ability of undead shade, if they attack, they will still remain invisible) for X seconds

part two-it makes all enemy-player's heroes visible (i tried to make this based on item ability "dust of blabla" but i dont know how, so another choice is to give all friendly units "detector" ability) for X seconds

part three-it doesnt make the caster himself invisible or "detector" and this spell will stun him for X seconds

X is the same in all parts, it will change its value depends on level of the spell (the spell is suposed to have three levels so on)

I tried to make it but after 2 hours of work it still doesnt work propertly (to say it better-it doesnt work at all)
 
First create a spellbook with the min/max spells set to 2. Next add the spells Ghost and Trusight (Shade) to the spellbook. Next in the initilization trigger disable that spellbook. When the hero casts teh ability, set a unit group to the friendlys that are around the hero, and add the spellbook. Then start a timer. When the timer expires, remove the spellbook from the units in that group. (dont forget to destroy the group) Finally, create a dummy caster with a modified stormbolt ability, and order it to cast stormbolt on the caster.
That just about wraps it up.
 
Level 18
Joined
Aug 13, 2007
Messages
1,584
Make a variable named "AlliedHeroes" of type Unit Group.

Make a spell based off Storm Bolt with a X second duration and "Player Units, Hero" targets allowed. Give it to a dummy unit.

  • Invis. Spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) equal to Your Spell
    • Actions
      • All - Set AlliedHeroes = ((Matching Unit Is A Hero) And (Matching Unit Is Alive)) And ((Owner of (Matching Unit) Is an Ally of (Owner of (Casting Unit))) And (Matching Unit Not Equal to (Casting Unit)))
      • Unit Group - Pick Every Unit In AlliedHeroes and do (Actions)
        • Loop - Actions
          • Unit - Add Ghost (Invisible) to (Picked Unit)
      • Unit - Create 1 Dummy for (Owner of (Casting Unit)) at (Position of (Casting Unit)) facing (Default Building Facing) degrees
      • Unit - Order Last Created Unit to Human Mountain King - Storm Bolt (Casting Unit)
      • Unit - Add a 0.5 secong Generic expiration timer to (Last Created Unit)
      • - General - Wait X seconds
      • Unit Group - Pick Every Unit In AlliedHeroes and do (Actions)
        • Loop - Actions
          • Unit - Remove Ghost (Invisible) from (Picked Unit)
      • Unit Group - Remove all units from AlliedHeroes
  • Death Case
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying Unit) Is in AlliedHeroes) Equal to True
    • Actions
      • Unit - Remove Ghost (Invisible) from (Dying Unit)
 
Last edited:
Level 18
Joined
Aug 13, 2007
Messages
1,584
  • Actions
    • All - If/Then/Else - Multiple Actions
      • If - Conditions
        • (Level of (Ability Being Cast)) Equal to 1
      • Then - Actions
        • General - Wait 5 seconds
      • Else - Actions
        • All - If/Then/Else - Multiple Actions
          • If - Conditions
            • (Level of (Ability Being Cast)) Equal to 2
          • Then - Actions
            • General - Wait 10 seconds
          • Else - Actions
            • All - Further actions for other ability levels
  • Actions
    • All - If/Then/Else - Multiple Actions
      • If - Conditions
        • (Level of (Ability Being Cast)) Equal to 1
      • Then - Actions
        • Unit - Create 1 Dummy for (Owner of (Casting Unit)) at (Position of (Casting Unit)) facing (Default Building Facing) degrees
        • Unit - Order Last Created Unit to Human Mountain King - Storm Bolt_1 (with 5 stun duration) (Casting Unit)
      • Else - Actions
        • All - If/Then/Else - Multiple Actions
          • If - Conditions
            • (Level of (Ability Being Cast)) Equal to 2
          • Then - Actions
            • Unit - Create 1 Dummy for (Owner of (Casting Unit)) at (Position of (Casting Unit)) facing (Default Building Facing) degrees
            • Unit - Order Last Created Unit to Human Mountain King - Storm Bolt_2 (with 10 stun duration) (Casting Unit)
          • Else - Actions
            • All - Further actions for other ability levels
 
Status
Not open for further replies.
Top