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

Order Command not working. Again.

Status
Not open for further replies.
Level 2
Joined
Mar 31, 2004
Messages
21
Code:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Become a Doctor
    Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of items carried by (Casting unit)) Less than 6
            Then - Actions
                Game - Display to (All players) the text: ((Name of (Owner of (Casting unit))) +  is now a doctor.)
                Unit - Change ownership of Become a Doctor 0027 <gen> to (Owner of (Casting unit)) and Change color
                Game - Display to (Player group((Owner of (Casting unit)))) the text: Nurse: Okay, you're...
                Set DiseaseManActive = True
                Unit - Create 1 Villager (Diseased) for Player 9 (Gray) at (Random point in (Playable map area)) facing (Position of (Casting unit))
                Set Patient = (Last created unit)
                Cinematic - Ping minimap for (Player group((Owner of (Casting unit)))) at (Position of (Last created unit)) for 1.00 seconds, using a Flashy ping of color (0.00%, 60.00%, 0.00%)
                Wait 0.20 seconds
                Unit - Order Disease Man 0029 <gen> to Night Elf Keeper Of The Grove - Entangling Roots Patient
            Else - Actions
    Else - Actions

Everything works, except the last Order. I know I'm forgetting something, I haven't made maps in ages. :roll:
 
Level 6
Joined
Feb 18, 2005
Messages
263
the command will only work, if the unit ordered to do anything can see the target. and reach it.
with spells there is sometimes the bug that in can only cast on targets within the range of the spell...

you might try out these. Hope it works then
 
Level 2
Joined
Mar 31, 2004
Messages
21
Oh. I put the reach of the spell to 99999.00 or something, but not his Line of Sight.

EDIT: Well, it can see the target, reach the target, even attack the target (which it won't do either), but it's not doing anything. Not even moving.
 
Level 2
Joined
Mar 31, 2004
Messages
21
Um, using iseedeadpeople and some other stuff, I figured out that the problem was that "You can't target your own units". You could target allies, neutrals, and enemies, but not units beloning to the same player. Fixed that now, thanks. :p
 
Status
Not open for further replies.
Top