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

Need help with Illusion based ability

Status
Not open for further replies.
Level 2
Joined
May 11, 2007
Messages
24
Alright, you'll probably get a lot of Need Help! posts from me in the future, as the first map I'm trying to make is complicated o_O However, I totally believe in diving right in :infl_thumbs_up:

Anyway, the problem I'm having is simple. I'm trying to create an ability that when used the hero creates an image of himself. This seems easy, but, if I base the ability off of Mirror Image, Everytime a new image is summoned, it removes all the previous images.

The idea of the ability is that it summons an image on a 10 second cooldown, where images last for 30 seconds. So you can continually create them and keep a certain amount of them up.

The other thing I tried was to base the ability off of the wand of illusion, which seemed more practical. I got everything on the ability to work, except for one thing, and that's that everytime I use the ability, even if I set it to self target only, I still have to target myself.

Is there a better way to do this? Such as, a way to remove the need to target myself to create an image, or do I have to resort to GUI triggering for the spell?

Thanks :)
 
Level 4
Joined
Nov 25, 2006
Messages
63
Well, the're spells that summons a unit everytime you use the spell, like the spell that summons quelbeasts. Every time you use the spell there is a new quelbeast, if you change the unit quelbeast to the unit you want, you're done! From the unit you want you can change the model to a mirror image if you want.
 
Level 2
Joined
May 11, 2007
Messages
24
Alright, I'll check it out. The only problem I see is that I want it to summon an illusions that deals a % dmg and takes 200% damage, so I don't know if I'll be able to do that with a summon ability.
 
Level 6
Joined
Jan 7, 2007
Messages
247
You should make it triggered. On use create a dummy and order it to cast staff of illusion (or how do u call this item in english) on summoning unit. So u will get unlimited illusions.
 
Level 4
Joined
Jun 1, 2007
Messages
92
You can use this trigger however your Dummy Unit would need to have the usable Inventory ability.
  • Illusion
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (Your Illusion Ability)
    • Actions
      • Set Temp_Point = (Position of (Casting unit))
      • Unit - Create (Dummy Unit With Inventory) for (Owner of (Casting unit)) at Temp_Point facing Default building facing degrees
      • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
      • Hero - Create Wand of Illusion and give it to (Last created unit)
      • Hero - Order (Last created unit) to use (Item carried by (Last created unit) of type Wand of Illusion) on (Casting unit)
      • Custom script: call RemoveLocation(udg_Temp_Point)
 
Level 2
Joined
May 11, 2007
Messages
24
Ok, first I'd like to thank everyone for their help and assistance, as this is my first semi-complicated trigger, mainly because I had to find a way to get it to work on a level basis. With your help and the help of paskovichs spell tutorial, here is the trigger I came up with:

  • Kikus Shadow
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Kiku's Shadow
    • Actions
      • If (((Triggering unit) has buff Shadow (1) ) Equal to True) then do (Set ShadowLevel = 1) else do (Do nothing)
      • If (((Triggering unit) has buff Shadow (2) ) Equal to True) then do (Set ShadowLevel = 2) else do (Do nothing)
      • If (((Triggering unit) has buff Shadow (3) ) Equal to True) then do (Set ShadowLevel = 3) else do (Do nothing)
      • If (((Triggering unit) has buff Shadow (4) ) Equal to True) then do (Set ShadowLevel = 4) else do (Do nothing)
      • Set Shadowtemp = (Position of (Triggering unit))
      • Unit - Create 1 Shadowcaster for (Owner of (Triggering unit)) at Shadowtemp facing 0.00 degrees
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ShadowLevel Equal to 1
        • Then - Actions
          • Hero - Create Shadowwand(1) and give it to (Last created unit)
          • Hero - Order (Last created unit) to use (Last created item) on (Triggering unit)
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ShadowLevel Equal to 2
        • Then - Actions
          • Hero - Create Shadowwand(2) and give it to (Last created unit)
          • Hero - Order (Last created unit) to use (Last created item) on (Triggering unit)
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ShadowLevel Equal to 3
        • Then - Actions
          • Hero - Create Shadowwand(3) and give it to (Last created unit)
          • Hero - Order (Last created unit) to use (Last created item) on (Triggering unit)
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ShadowLevel Equal to 4
        • Then - Actions
          • Hero - Create Shadowwand(4) and give it to (Last created unit)
          • Hero - Order (Last created unit) to use (Last created item) on (Triggering unit)
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
        • Else - Actions
      • Custom script: call RemoveLocation(udg_Shadowtemp)
It's probably simple to a lot of you, but to me it took 3 hours and lots of research o_O But the good news is I learned from it and my newer triggers should go by quicker. It seems to be bug free so far, if there are leaks, as I'm not sure if integers qualify as a leak, but I don't know to remove them, please let me know, and again, thanks all for the assistance :infl_thumbs_up:

EDIT: I change the event trigger from Finishes casting an ability to Stops casting an ability, because I was having an issue during my testing where if you cast the ability and moved immediately while casting, you wouldn't finishing casting and the trigger wouldn't take effect. I have to use stops instead of begins because I have the ability put a 1 second buff of a certain level based on the skill level on the hero, because I couldn't think of another way to check for level.
 
Last edited:
Level 4
Joined
Jun 1, 2007
Messages
92
You can use the Integer Condition - Unit - Level Of Ability For Unit to detect the ability's level.
  • (Level of Kiku's Shadow for (Casting Unit)) Equal to 1
From what I see the trigger is leakless. However, the trigger may be more simpler to use (Casting Unit) instead of (Triggering Unit).
 
Status
Not open for further replies.
Top