HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Divine Sheild other untis

06-27-2005, 10:20 PM#1
emp_can
I want a target spell that divine shields other units as a target spell.
06-27-2005, 10:29 PM#2
Tim.
You could use a trigger to make the unit temporarily invulnerable and then use a buff to attatch the Devine Shield effect.

Just one way of doing it.
06-27-2005, 11:29 PM#3
Guest
Just make an ability based on Inner Fire, set all data to 0 or 0.01 so it's just for looks. Then, add the Divine shield effect to it instead of inner fire. then make a trigger:

Events:
Unit - Unit Starts the Effect of an ability

Conditions:
Ability being cast equal to <castable divine shield>

Actions:
Unit - Make Target Unit of Ability being cast invulnerable
Wait - <duration of ability>
Unit - Make Target Unit of Ability being cast vulnerable
06-28-2005, 07:17 AM#4
Anitarf
Quote:
Originally Posted by eclips)e
Just make an ability based on Inner Fire, set all data to 0 or 0.01 so it's just for looks. Then, add the Divine shield effect to it instead of inner fire. then make a trigger:

Events:
Unit - Unit Starts the Effect of an ability

Conditions:
Ability being cast equal to <castable divine shield>

Actions:
Unit - Make Target Unit of Ability being cast invulnerable
Wait - <duration of ability>
Unit - Make Target Unit of Ability being cast vulnerable
Due to bugged cast event responses, that won't work. They act as global variables and can be reset during waits.
06-28-2005, 09:47 AM#5
oNdizZ
Quote:
Originally Posted by Anitarf
Due to bugged cast event responses, that won't work. They act as global variables and can be reset during waits.


A way of fixing this would be to add a local. then it would look something like this:

Actions:
Custom script: local unit tempUnit=Target Unit of Ability being cast
Unit - Make tempUnit invulnerable
Wait Gametime - <duration of ability>
Unit - Make tempUnit vulnerable
Custom script: set tempUnit=null
06-28-2005, 10:20 AM#6
iNfraNe
or to be more precise:

Code:
Custom script: local unit u=GetSpellTargetUnit()
Custom script: call SetUnitInvulnerable(u, true)
Wait Gametime - <duration of ability>
Custom script: call SetUnitInvulnerable(u, false)
Custom script: set u=null

we're such a great team ;)