• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Requesting an illusion spell

Status
Not open for further replies.
Level 3
Joined
Feb 15, 2015
Messages
26
Hi! I'm currently working on an ability that is similar to Spectre's Ultimate in DotA 2. What it does is creating an illusion for each enemy hero on the map at their location. My problem is everytime more than one unit cast a spell at the same time (i'm trying to make it MUI), illusions don't get moved accordingly to their supposed position.

Let me explain further: I have 5 enemy heroes in my map and 2 units casting the ability. If worked, it is supposed that each enemy hero has 2 illusions. However, everytime the 2 units cast the ability, some heroes have 3 illusions, some have 2 and some don't even have any.

So can anyone make me a GUI/MUI version of the spell I need? Thanks and +rep for your help.

EDIT 1: The number of illusions created is still correct (5 for each enemy hero per cast), just their positions are incorrect.
 
Level 22
Joined
Aug 27, 2013
Messages
3,973
You can use GUI Custom Illusion v1.1 to create some illusions at your desired location.

Just alter the demo trigger to something like this.
  • Illusion
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to YourAbility
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
              • ((Picked unit) is A Hero) Equal to True
            • Then - Actions
              • -------- set base unit --------
              • Set CI_IllusionUnit = (Picked unit)
              • -------- set the facing angle, etc. --------
              • Set CI_IllusionFacing = (Facing of (Picked unit))
              • Set CI_IllusionOwner = (Owner of (Triggering unit))
              • -------- no need to remove this location afterwards --------
              • Set Cl_IllusionLocation = (Position of (Picked unit))
              • -------- This means the image will deals full damage --------
              • Set CI__DealtDmgFactor = 1.00
              • -------- This means the image will takes 4x of original damage --------
              • Set CI__TakenDmgFactor = 4.00
              • -------- create the illusion based on variables above --------
              • Custom script: call ExecuteFunc("CI__Copy")
            • Else - Actions
 
Level 3
Joined
Feb 15, 2015
Messages
26
You can use GUI Custom Illusion v1.1 to create some illusions at your desired location.

Just alter the demo trigger to something like this.
  • Illusion
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to YourAbility
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
              • ((Picked unit) is A Hero) Equal to True
            • Then - Actions
              • -------- set base unit --------
              • Set CI_IllusionUnit = (Picked unit)
              • -------- set the facing angle, etc. --------
              • Set CI_IllusionFacing = (Facing of (Picked unit))
              • Set CI_IllusionOwner = (Owner of (Triggering unit))
              • -------- no need to remove this location afterwards --------
              • Set Cl_IllusionLocation = (Position of (Picked unit))
              • -------- This means the image will deals full damage --------
              • Set CI__DealtDmgFactor = 1.00
              • -------- This means the image will takes 4x of original damage --------
              • Set CI__TakenDmgFactor = 4.00
              • -------- create the illusion based on variables above --------
              • Custom script: call ExecuteFunc("CI__Copy")
            • Else - Actions

I tried, but for some reasons it bugged: For the first cast, no illusions were created. For the following casts, illusions were created but also tons of my casters were created at the Center of Playable area and didn't dissapear afterwards. Also, can I edit the duration of the illusions, as I just want them to exist for a short time, not permanently
 
Status
Not open for further replies.
Top