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

[Solved] Illusion ability is not being cast on enemies

Status
Not open for further replies.
Level 12
Joined
May 16, 2020
Messages
660
Hi guys,

I recently created a new map to test spells quicker, so I copied the libraries (where everything works) from my main map to the testmap.

The problem is that the Illusion ability is not cast when targeting enemies:
  • Custom script: call IssueTargetOrderById(udg_Illusion_Dummy, 852274, udg_Disruption_Target[udg_Disruption_Integer_A])
The weird thing is that the spell works in my main map, without any code changes.

Here the spell description:
Banishes the targeted unit from the battlefield for a short duration. Upon returning, two illusions of the banished unit are created under Shadow Demon's control.

I attached the test map. The invovled triggers are:

Illusion System
  • IllusionCreate
    • Events
    • Conditions
    • Actions
      • Set VariableSet Illusion_Point = (Position of Illusion_Caster)
      • Unit - Create 1 Dummy (Fly/Speed 0) for Illusion_Player at Illusion_Point facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_Illusion_Point)
      • Set VariableSet Illusion_Dummy = (Last created unit)
      • Unit - Add Illusion.ABILITY to Illusion_Dummy
      • Unit - Add a 0.50 second Generic expiration timer to Illusion_Dummy
      • Ability - Set Ability: (Unit: Illusion_Dummy's Ability with Ability Code: Illusion.ABILITY )'s Real Level Field: Damage Dealt (% of normal) ('Iild') of Level: 0 to Illusion_DamageDealt
      • Ability - Set Ability: (Unit: Illusion_Dummy's Ability with Ability Code: Illusion.ABILITY )'s Real Level Field: Damage Received Multiplier ('Iilw') of Level: 0 to Illusion_DamageTaken
      • Ability - Set Ability: (Unit: Illusion_Dummy's Ability with Ability Code: Illusion.ABILITY )'s Real Level Field: Duration - Hero ('ahdu') of Level: 0 to Illusion_Duration
      • Ability - Set Ability: (Unit: Illusion_Dummy's Ability with Ability Code: Illusion.ABILITY )'s Real Level Field: Duration - Normal ('adur') of Level: 0 to Illusion_Duration
      • Custom script: call IssueTargetOrderById(udg_Illusion_Dummy, 852274, udg_Illusion_Caster)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Illusion_AppearCustomized Equal to True
        • Then - Actions
          • Trigger - Turn on IllusionDetect <gen>
        • Else - Actions
  • IllusionDetect
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Triggering unit) is an illusion) Equal to True
    • Actions
      • Set VariableSet Illusion_AppearCustomized = False
      • -------- --------
      • Set VariableSet Illusion_UnitIllusion = (Triggering unit)
      • Unit - Move Illusion_UnitIllusion instantly to Illusion_AppearPoint, facing Illusion_AppearFacing degrees
      • Set VariableSet Illusion_Event = 1.00
      • Set VariableSet Illusion_Event = 0.00
      • Custom script: call RemoveLocation(udg_Illusion_AppearPoint)
      • -------- --------
      • Set VariableSet Illusion_Custom = <Empty String>
      • Trigger - Turn off (This trigger)
Disruption:
  • Disruption
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Disruption
    • Actions
      • Set VariableSet Disruption_Index = (Disruption_Index + 1)
      • Set VariableSet Disruption_Caster[Disruption_Index] = (Triggering unit)
      • Set VariableSet Disruption_Target[Disruption_Index] = (Target unit of ability being cast)
      • Set VariableSet Disruption_Counter[Disruption_Index] = 0
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Disruption_Index Equal to 1
        • Then - Actions
          • Countdown Timer - Start Disruption_Timer as a Repeating timer that will expire in 0.05 seconds
          • Trigger - Turn on Disruption Loop <gen>
        • Else - Actions
      • -------- --------
      • Set VariableSet Disruption_Point = (Position of Disruption_Target[Disruption_Index])
      • Special Effect - Create a special effect at Disruption_Point using WILLTHEALMIGHTY-Void5.mdx
      • Set VariableSet Disruption_SFX[Disruption_Index] = (Last created special effect)
      • Unit - Make Disruption_Target[Disruption_Index] Invulnerable
      • -------- Adding to Group for Sanity's Eclipse Damage through Invulnerability --------
      • Unit Group - Add Disruption_Target[Disruption_Index] to Disruption_Group
      • Unit - Hide Disruption_Target[Disruption_Index]
      • -------- --------
      • Visibility - Create an initially Enabled visibility modifier for (Owner of Disruption_Target[Disruption_Index]) emitting Visibility from Disruption_Point to a radius of 800.00.
      • Set VariableSet Disruption_Vision[Disruption_Index] = (Last created visibility modifier)
      • Custom script: call RemoveLocation(udg_Disruption_Point)
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Disruption_Caster[Disruption_Index] Not equal to Disruption_Target[Disruption_Index]
        • Then - Actions
          • Unit - Pause Disruption_Target[Disruption_Index]
        • Else - Actions
          • Wait 0.01 seconds
          • Unit - Pause Disruption_Target[Disruption_Index]
  • Disruption Loop
    • Events
      • Time - Disruption_Timer expires
    • Conditions
    • Actions
      • For each (Integer Disruption_Integer_A) from 1 to Disruption_Index, do (Actions)
        • Loop - Actions
          • Set VariableSet Disruption_Counter[Disruption_Integer_A] = (Disruption_Counter[Disruption_Integer_A] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Disruption_Counter[Disruption_Integer_A] Greater than or equal to 55
            • Then - Actions
              • Visibility - Disable Disruption_Vision[Disruption_Integer_A]
              • Visibility - Destroy Disruption_Vision[Disruption_Integer_A]
              • Unit - Unpause Disruption_Target[Disruption_Integer_A]
              • Unit - Make Disruption_Target[Disruption_Integer_A] Vulnerable
              • Unit Group - Remove Disruption_Target[Disruption_Integer_A] from Disruption_Group.
              • Unit - Unhide Disruption_Target[Disruption_Integer_A]
              • Selection - Select Disruption_Target[Disruption_Integer_A] for (Owner of Disruption_Target[Disruption_Integer_A])
              • -------- --------
              • Special Effect - Destroy Disruption_SFX[Disruption_Integer_A]
              • Special Effect - Create a special effect attached to the origin of Disruption_Target[Disruption_Integer_A] using UltKillShadow.mdx
              • Special Effect - Destroy (Last created special effect)
              • -------- --------
              • Set VariableSet Disruption_CV = (Custom value of Disruption_Caster[Disruption_Integer_A])
              • Set VariableSet Disruption_TargetIllusion[Disruption_CV] = Disruption_Target[Disruption_Integer_A]
              • -------- --------
              • Set VariableSet Disruption_CounterIllusion = 0
              • Trigger - Turn on Disruption Attack <gen>
              • -------- --------
              • Set VariableSet Illusion_Point = (Position of Disruption_Target[Disruption_Integer_A])
              • Unit - Create 1 Dummy (Ground/Speed 0) for (Owner of Disruption_Caster[Disruption_Integer_A]) at Illusion_Point facing Default building facing degrees
              • Set VariableSet Illusion_Dummy = (Last created unit)
              • Unit - Add Illusion.ABILITY to Illusion_Dummy
              • Unit - Add a 0.50 second Generic expiration timer to Illusion_Dummy
              • Ability - Set Ability: (Unit: Illusion_Dummy's Ability with Ability Code: Illusion.ABILITY )'s Real Level Field: Damage Dealt (% of normal) ('Iild') of Level: 0 to (0.15 + (0.15 x (Real((Level of Disruption for Disruption_Caster[Disruption_Integer_A])))))
              • Ability - Set Ability: (Unit: Illusion_Dummy's Ability with Ability Code: Illusion.ABILITY )'s Real Level Field: Damage Received Multiplier ('Iilw') of Level: 0 to 3.00
              • Ability - Set Ability: (Unit: Illusion_Dummy's Ability with Ability Code: Illusion.ABILITY )'s Real Level Field: Duration - Hero ('ahdu') of Level: 0 to (10.00 + (Real((Level of Disruption for Disruption_Caster[Disruption_Integer_A]))))
              • Ability - Set Ability: (Unit: Illusion_Dummy's Ability with Ability Code: Illusion.ABILITY )'s Real Level Field: Duration - Normal ('adur') of Level: 0 to (10.00 + (Real((Level of Disruption for Disruption_Caster[Disruption_Integer_A]))))
              • Ability - Set Ability: (Unit: Illusion_Dummy's Ability with Ability Code: Illusion.ABILITY )'s Real Level Field: Area of Effect ('aare') of Level: 0 to 48.00
              • Custom script: call RemoveLocation(udg_Illusion_Point)
              • -------- --------
              • For each (Integer Disruption_Integer_B) from 1 to 2, do (Actions)
                • Loop - Actions
                  • Custom script: call IssueTargetOrderById(udg_Illusion_Dummy, 852274, udg_Disruption_Target[udg_Disruption_Integer_A])
              • -------- --------
              • Set VariableSet Disruption_Caster[Disruption_Integer_A] = Disruption_Caster[Disruption_Index]
              • Set VariableSet Disruption_Target[Disruption_Integer_A] = Disruption_Target[Disruption_Index]
              • Set VariableSet Disruption_Counter[Disruption_Integer_A] = Disruption_Counter[Disruption_Index]
              • Set VariableSet Disruption_SFX[Disruption_Integer_A] = Disruption_SFX[Disruption_Index]
              • Set VariableSet Disruption_Vision[Disruption_Integer_A] = Disruption_Vision[Disruption_Index]
              • -------- --------
              • Set VariableSet Disruption_Index = (Disruption_Index - 1)
              • Set VariableSet Disruption_Integer_A = (Disruption_Integer_A - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Disruption_Index Equal to 0
                • Then - Actions
                  • Countdown Timer - Pause Disruption_Timer
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
  • Disruption Attack
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Triggering unit) is an illusion) Equal to True
      • Disruption_CounterIllusion Less than 2
    • Actions
      • Set VariableSet Disruption_CounterIllusion = (Disruption_CounterIllusion + 1)
      • Set VariableSet Illusion_UnitIllusion = (Triggering unit)
      • Set VariableSet Disruption_CV = (Custom value of Illusion_Caster)
      • Unit - Order Illusion_UnitIllusion to Attack Disruption_TargetIllusion[Disruption_CV]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Disruption_CounterIllusion Equal to 2
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
 

Attachments

  • Land of Legends Test Map v0.0.01.w3m
    955.3 KB · Views: 9
Last edited:
Level 25
Joined
Feb 9, 2009
Messages
1,800
Isolating the spell and attempting to manually cast on an enemy results in this:
1650869790436.png


And looking at the spell itself you can see why:
1650869830973.png
 
Status
Not open for further replies.
Top