• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Spell Casting doesn t work

Status
Not open for further replies.
Level 26
Joined
Dec 3, 2018
Messages
874
This trigger should make LighingCaster cast chain lightning on a random unit from 800 range of the mage
  • Lightning Damage
    • Events
      • Time - Every 6.00 seconds of game time
    • Conditions
    • Actions
      • Set VariableSet LightninPoint = (Position of Mage)
      • Set VariableSet LightninGroup = (Units within 800.00 of LightninPoint matching (((Mage is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of Mage).) Equal to True)).)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in LightninGroup) Greater than 0
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Triggering unit) has buff Rejuvenation) Equal to False
            • Then - Actions
              • Set VariableSet LightninUnit = (Random unit from LightninGroup)
              • Unit - Order LightningCaster to Orc Far Seer - Chain Lightning LightninUnit
            • Else - Actions
              • Do nothing
        • Else - Actions
      • Custom script: call RemoveLocation(udg_LightninPoint)
      • Custom script: call DestroyGroup(udg_LightninGroup)
 
Last edited:
Level 20
Joined
Feb 27, 2019
Messages
593
I dont see how (Units within 800.00 of LightninPoint matching (((Mage is alive) can be equal to true. I assume you meant to use "Matching unit" instead of "Mage". Also in the If then else condition you have a condition that references "triggering unit" but the event does not have a triggering unit since the event is started from a timer. Triggering unit would only be valid if the event is triggered by a unit. To check for a condition in a group properly you first need to pick every unit in the group and do multiple actions. Then you can add the if then else condition with the condition "Picked unit" has buff Rejuvenation.
 
Status
Not open for further replies.
Top