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

Polymorph Cast By Dummy

Status
Not open for further replies.
Level 4
Joined
Oct 23, 2006
Messages
65
Fix it or I will be sad. :(

Code:
ManaBurn
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Mana Burn (Antimage)
    Actions
        Set ManaBurn = (Random integer number between 1 and 100)
        Set ManaBurnTarget = (Position of (Target unit of ability being cast))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Level of Mana Burn (Antimage) for (Triggering unit)) x 10) Less than or equal to ManaBurn
            Then - Actions
                Unit - Create 1 Dummy for (Owner of (Triggering unit)) at ManaBurnTarget facing Default building facing degrees
                Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
                Unit - Add ManaBurnPolyMorph  to (Last created unit)
                Unit - Order (Last created unit) to Human Sorceress - Polymorph (Target unit of ability being cast)
                Custom script:   call RemoveLocation( udg_ManaBurnTarget )
                Set ManaBurnEffect = (Last created special effect)
            Else - Actions
                Do nothing
        Wait 2.00 seconds
        Special Effect - Destroy ManaBurnEffect

What it is supposed to do is manaburn the target and have a 10% chance per level to polymorph the target as well.
 
Level 4
Joined
Oct 23, 2006
Messages
65
donut3.5 said:
It's probably because units can't recognize ability commands if they don't start with them. Meaning, take out Unit - Add ManaBurnPolyMorph to (Last created unit)
and in the object editor just give the dummy the spell.
--donut3.5--
I tried this originally, no go.

I got it to work. It was to do with the allowed targets. durr. Thanks though donut!
 
Status
Not open for further replies.
Top