Need help getting custom spell to work.

Haxxors

New Member
Reaction score
1
I've recently just begun making custom spells in GUI. I'm fairly nooby at this so i'll try to explain it as best I can.

I'm made this ability and I'm trying to get it to work, but it wont :/

The Ability: Holy Shield - The Priest casts Holy shield, making him and his allies invulnerable for 7 seconds. At the end of the 7 seconds the priests allies will be healed for 200.

Right now I can get the spell to make all the allies invulnerable and thats about it. They go invulnerable and then they are stuck that way. The heal doesn't go off, and the shield effect that I use doesnt go away either.

Here is the trigger, i'm sorry if it's terrible lol :O

Code:
Holy Shield
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Holy Shield 
    Actions
        Set HolyShieldCaster[12] = (Triggering unit)
        Set HolyShieldCasterLoc = (Position of HolyShieldCaster[12])
        Set HolyShieldGroup = (Units within 1000.00 of HolyShieldCasterLoc matching (((Matching unit) belongs to an ally of (Triggering player)) Equal to True))
        Special Effect - Create a special effect attached to the origin of HolyShieldCaster[12] using Abilities\Spells\Human\ManaShield\ManaShieldCaster.mdl
        Set Sfx3 = (Last created special effect)
        Unit Group - Pick every unit in HolyShieldGroup and do (Actions)
            Loop - Actions
                Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\ManaShield\ManaShieldCaster.mdl
                Set Sfx4 = (Last created special effect)
                Unit - Make (Picked unit) Invulnerable
                Wait 7.00 game-time seconds
                Unit - Make (Picked unit) Vulnerable
                Special Effect - Destroy Sfx3
                Special Effect - Destroy Sfx4
                Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + 200.00)
                Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
                Special Effect - Destroy (Last created special effect)
        Custom script:   call RemoveLocation (udg_HolyShieldCasterLoc)
        Custom script:   call DestroyGroup (udg_HolyShieldGroup)

Thank you :D
 

Chao

Setting sail for fail in the sea of lame.
Reaction score
63
Actions
3rd Line: " Set HolyShieldGroup = (Units within 1000.00 of HolyShieldCasterLoc matching (((Matching unit) belongs to an ally of (Triggering player)) Equal to True))"
Change that to "Owner of Casting Unit"
:)
That's actually all I can see!

EDIT:
You may also want to make this two separate triggers.
Trigger A would make them invulnerable, and create the special effects, as well as initializing the triggers.
I'd create a Countdown Timer that would replace that "Wait" (waits can be sticky, maybe it's just me) that lasts the allotted amount of time and then a second trigger that sews up all your loose ends.
 

Haxxors

New Member
Reaction score
1
I changed it and it does the same thing as before :/

They all get the effect and go invuln, but they never go vulnerable again and never get healed
 

jig7c

Stop reading me...-statement
Reaction score
123
you might need a dummy to cast the spells...

Set HolyShieldCaster[12] = (Triggering unit)
Set HolyShieldCasterLoc = (Position of HolyShieldCaster[12])
Set HolyShieldGroup = (Units within 1000.00 of HolyShieldCasterLoc matching (((Matching unit) belongs to an ally of (Triggering player)) Equal to True))
Special Effect - Create a special effect attached to the origin of HolyShieldCaster[12] using Abilities\Spells\Human\ManaShield\ManaShieldCaster.mdl
Set Sfx3 = (Last created special effect)
Unit Group - Pick every unit in HolyShieldGroup and do (Actions)
Loop - Actions
Create 1 dummy for holyshieldcaster[12] at position of picked unit facing default degrees...
add a 1 second generic expiration timer to last created unit
order last created unit to Invunerable picked unit
Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\ManaShield\ManaShieldCaster.mdl
Set Sfx4 = (Last created special effect)
Special Effect - Destroy Sfx3
Special Effect - Destroy Sfx4
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + 200.00)
Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation (udg_HolyShieldCasterLoc)
Custom script: call DestroyGroup (udg_HolyShieldGroup)


make sure your dummy unit has the UNIT ability that makes the the game-units invunerable for 7 seconds
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top