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

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