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

Need Help with a simple spell

Status
Not open for further replies.
Level 1
Joined
Dec 20, 2005
Messages
4
I tried to make a spell to bind all nearby ebemy units with shackles, but it stops binding after the first unit this is how far i did:

Code:
MassShackles
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Mass Shackles 
    Actions
        Unit Group - Pick every unit in (Units within 800.00 of (Position of (Casting unit))) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Owner of (Casting unit)) is an ally of (Owner of (Picked unit))) Equal to True
                    Then - Actions
                    Else - Actions
                        Unit - Create 1 Dummy Unit for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
                        Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
                        Unit - Make (Last created unit) Invulnerable
                        Unit - Add Shackles (Mass) to (Last created unit)
                        Unit - Order (Last created unit) to Human Dragonhawk Rider - Aerial Shackles (Picked unit)

If someone help me fix this I will be able to make it channeling so the caster will be not able to move before stopping.
 
Level 6
Joined
Sep 17, 2005
Messages
276
plasmodioum said:
MassShackles
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Mass Shackles
Actions
Unit Group - Pick every unit in (Units within 800.00 of (Position of (Casting unit))) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Casting unit)) is an ally of (Owner of (Picked unit))) Equal to True
Then - Actions
Else - Actions
Unit - Create 1 Dummy Unit for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
Unit - Make (Last created unit) Invulnerable
Unit - Add Shackles (Mass) to (Last created unit)
Unit - Order (Last created unit) to Human Dragonhawk Rider - Aerial Shackles (Picked unit)

hm.. at the bold position above i think its strange that you create only 1 dummy at pos of casting unit. replace that function with 'position of picked unit' and it should work properly then - hopefully :wink: [/b]
 
Level 1
Joined
Dec 20, 2005
Messages
4
No! I want the shackles source be the caster... So the "ropes" will be start from the caster...
I don't know what to do...
PLEASE HELP :!: :!: :!: :D
 
Level 1
Joined
Dec 20, 2005
Messages
4
After 4 minutes thinking solutions I realised that when the dummy unit casts shackles to the first enemy the trigger has to restart and check the conditions so! What if all dummy units cast the spells after ordering all of them!? So! I put a 0.01 casting time to Shackles and it worked!!!
 
Status
Not open for further replies.
Top