HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Ressurection trigger plz

02-22-2005, 03:00 PM#1
The_AwaKening
I'm trying to make a trigger so that after a unit is ressurected by your paladin, it becomes one of your units and you can control it. I used to have this but lost it so I know it can be done, but I can't seem to get it right.
02-22-2005, 04:02 PM#2
Guest
E: A unit finishes casting a spell

C: Unit type of (casting unit) equal to paladin
Spell type of (last casted spell) equal to resurrect

A: Change ownership of (last (???) unit) to (owner of (casting unit))

Where i wrote last (???) unt, i'm not sure what to put, if there is a "last resurrected unit" or maybe "target of (last casted spell)"
02-22-2005, 04:46 PM#3
Kamux
I think there isn't something like that BadFurDay....i think this will do the job:
Code:
trigger 1
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Resurrection
    Actions
        Unit Group - Pick every unit in (Units within 400.00 of (Position of (Triggering unit)) matching (((Matching unit) is dead) Equal to True)) and do (Actions)
            Loop - Actions
                Unit Group - Add (Picked unit) to group
Code:
trigger 2
    Events
        Unit - A unit Finishes casting an ability
    Conditions
        (Ability being cast) Equal to Resurrection
    Actions
        Unit Group - Pick every unit in group and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        True Equal to True
                    Then - Actions
                        Unit Group - Remove (Picked unit) from group
                    Else - Actions
                        Unit - Change ownership of (Picked unit) to (Owner of (Triggering unit)) and Change color
02-22-2005, 04:57 PM#4
shadow1500
you will have to make a custom ressuruction spell because its impossible to find which units were ressurected and which were not.
02-22-2005, 05:15 PM#5
Kamux
yes...that will also work..if you give a buff to the custom spell you can detect wich units were revived...but my method does work with the regular resurrection ;)
02-22-2005, 05:17 PM#6
Anitarf
Quote:
Originally Posted by shadow1500
you will have to make a custom ressuruction spell because its impossible to find which units were ressurected and which were not.
Actually it does seem possible the way Kamux wrote the trigger. Only one minor thing did he mistype: the condition in the if-then-else is incomplete (right now, it says "true equal to true"), it should read something like "(picked unit is dead) equal to true".
02-22-2005, 05:19 PM#7
Kamux
whoops....thanks for noticing it anitarf:)
02-22-2005, 10:51 PM#8
sc_freek
Why not just use Animate Dead?
I believe a 0 in the duration field means infinite duration for it...
02-23-2005, 03:35 AM#9
The_AwaKening
Thanks for the help guys, I have it working now.
02-23-2005, 08:27 AM#10
logik
no, actually there is a field on normal ressurection that allows it to work on enemy units etc.

have a good look at it and fiddle around with the fields ie. target types etc. and it should pull through for you...

because as i recall the original ressurection worked on all units, friend or foe.