• 🏆 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!

AOE Conversion Spell

Status
Not open for further replies.
Level 10
Joined
Jul 22, 2007
Messages
261
  • See The Truth
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to See The Truth
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Unit-type of (Triggering unit)) Equal to Pig) or ((Unit-type of (Triggering unit)) Equal to Racoon)
        • Then - Actions
          • Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Casting unit)) and Retain color
          • Wait 30.00 seconds
          • Unit - Kill (Target unit of ability being cast)
          • Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl
          • Wait 1.00 seconds
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions
          • Do nothing
Is there anything wrong with this trigger that would cause it not to convert?
The spell is based off "Howl of Terror"
THX
 
Level 4
Joined
Mar 14, 2009
Messages
98
Isn't howl of terror the Pit Lord's ability? I don't think that spell has a target unit of ability being cast. Instead you'd probably want to do something different like:


  • Mass Conversion
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Howl of Terror
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Triggering unit)) Equal to Raccoon
              • (Unit-type of (Triggering unit)) Equal to Pig
        • Then - Actions
          • Unit Group - Add all units of (Units within 512.00 of (Position of (Triggering unit))) to ConvertGroup
          • Unit Group - Pick every unit in ConvertGroup and do (Actions)
            • Loop - Actions
              • Unit - Change ownership of (Picked unit) to (Owner of (Triggering unit)) and Change color
          • Wait 30.00 game-time seconds
          • Set Index = 0
          • Unit Group - Pick every unit in ConvertGroup and do (Actions)
            • Loop - Actions
              • Unit - Kill (Picked unit)
              • Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
              • Set Index = (Index + 1)
              • Set SpecialEffects[Index] = (Last created special effect)
          • Wait 1.00 game-time seconds
          • For each (Integer A) from 1 to Index, do (Special Effect - Destroy SpecialEffects[(Integer A)])
        • Else - Actions

The example is not MUI.
 
Level 11
Joined
Nov 15, 2007
Messages
781
  • Events
    • Unit - A unit begins casting an ability
  • Conditions
    • Ability being cast equal to See the Truth
  • Actions
    • If/then/else
      • If - Conditions
        • Unit type of triggering unit = a pig or a racoon
      • Then - Actions
        • Set UnitGroupVariable = Units in # range of triggering unit matching unit belongs to an enemy of owner of casting unit = true AND unit is magic immune = false
        • Pick every unit in UnitGroupVariable and do
          • Unit - Change ownership of picked unit to owner of triggering unit
          • Unit - Add a 30 second generic expiration timer to picked unit
          • Unit - Add picked unit to SFXOnDeathUnitGroupVariable
        • Custom script: call DestroyGroup(udg_UnitGroupVariable)
Trigger2

  • Events
    • Unit - A unit dies
  • Conditions
    • Unit is in unit group SFXOnDeathUnitGroupVariable
  • Actions
    • Special Effect - Create special effect on unit using whateverspecialeffect
    • Special Effect - Destroy last created special effect
    • Unit - Remove unit from unit group SFXOnDeathUnitGroupVariable
I'm tired and this was written rather sloppily, but basically yes; there's a lot wrong with your trigger.
 
Status
Not open for further replies.
Top