• 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] Need Help with Chance on Attack Spell

Status
Not open for further replies.
Level 10
Joined
Sep 30, 2005
Messages
56
So I've been working on a spell that i had the idea for that basically goes like this: On each attack, you have a chance of creating an illusion of the unit you were attacking. In the design of my ability i had 2 ideas of approaching it.

Magic Arrow 1
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Magic Arrows <-- [Bash with a no damage bonus or stun]
(Level of Magic Arrows for (Casting unit)) Equal to 1
Actions
Unit - Create 1 Dummy Arrow 1 for (Owner of (Casting unit)) at (Position of (Target unit of ability being cast)) facing Default building facing degrees
Set Arrowtarget = (Target unit of ability being cast)

I had one of these for 3 levels and was then followed up by

Arrowcast
Events
Unit - A unit enters (Playable map area)
Conditions
Or - Any (Conditions) are true
Conditions
(Unit-type of (Entering unit)) Equal to Dummy Arrow 1
(Unit-type of (Entering unit)) Equal to Dummy Arrow 2
(Unit-type of (Entering unit)) Equal to Dummy Arrow 3
Actions
Unit - Order (Entering unit) to ____________________
Wait 2.00 seconds
Unit - Remove (Entering unit) from the game


My first problem i ran into was i could not even get the dummy unit to spawn. I figure this is because the unit isn't really casting an ability, but couldn't find another way that might make it work.

My second problem is where the _____________________ is. My idea was to have the dummy unit cast a modified version of the spell that the wand of illusion uses, but there was a very limited amount of choices to pick from the list that the trigger gave me. Is there a way to use triggers to make a unit cast a custom spell?

I would really appreciate if someone could help me with this and explain to me why things aren't working and how to fix it, or if you have a different approach entirely to make this idea work, I would also like to hear it.

=D
 
Level 6
Joined
Sep 4, 2007
Messages
157
  • Magic Arrow 1
  • Events
  • Unit - A unit Begins casting an ability
  • Conditions
  • (Ability being cast) Equal to Magic Arrows <-- [Bash with a no damage bonus or stun]
  • (Level of Magic Arrows for (Casting unit)) Equal to 1
  • Actions
  • Unit - Create 1 Dummy Arrow 1 for (Owner of (Casting unit)) at (Position of (Target unit of ability being cast)) facing Default building facing degrees
  • Set Arrowtarget = (Target unit of ability being cast)
  • I had one of these for 3 levels and was then followed up by
  • Arrowcast
  • Events
  • Unit - A unit enters (Playable map area)
  • Conditions
  • Or - Any (Conditions) are true
  • Conditions
  • (Unit-type of (Entering unit)) Equal to Dummy Arrow 1
  • (Unit-type of (Entering unit)) Equal to Dummy Arrow 2
  • (Unit-type of (Entering unit)) Equal to Dummy Arrow 3
  • Actions
  • Unit - Order (Entering unit) to ____________________
  • Wait 2.00 seconds
  • Unit - Remove (Entering unit) from the game
please remember to put your triggers in the trigger tags
 
Level 2
Joined
Feb 8, 2009
Messages
11
Well, you could just make a dummy ability, say...demolish with no bonus dmg to anything. Then make...

  • Helping you
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of dummy for (Attacking unit)) Equal to 1
    • Actions
      • -------- This is for a 10% chance of a proc. --------
      • Set randomnumber = (Random integer number between 1 and 10)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • randomnumber Equal to 7
        • Then - Actions
          • -------- Lucky 7! --------
          • Unit - Create 1 dummy for (Owner of (Attacking unit)) at (Position of (Attacking unit)) facing (Position of (Attacked unit))
          • Unit - Order (Last created unit) to Move To (Position of (Attacked unit))
          • Wait 0.25 seconds
          • Unit Group - Pick every unit in (Units within 200.00 of (Position of (Last created unit))) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Owner of (Picked unit)) Not equal to (Owner of (Attacking unit))
                • Then - Actions
                  • Unit - Order (Last created unit) to Night Elf Druid Of The Talon - Cyclone (Picked unit)
                  • -------- To change this to somthing else, change the actual cyclone to somthing else in the object editor (that is how i do it anyway) --------
                • Else - Actions
                  • Do nothing
          • -------- Rinse and repeat for however many seconds you want to it to go for (or you could do timers with variables, but this is the lazy way ). --------
          • Unit - Explode (Last created unit)
          • -------- Would look cool with somthing like a zombie that bites multiple targets then EXPLODES. --------
        • Else - Actions
          • Do nothing
          • -------- Shush, I like my Do-nothings. --------
 
Status
Not open for further replies.
Top