| 02-22-2005, 03:00 PM | #1 |
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 |
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 groupCode:
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 |
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 |
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 | |
Quote:
|
| 02-22-2005, 05:19 PM | #7 |
whoops....thanks for noticing it anitarf:) |
| 02-22-2005, 10:51 PM | #8 |
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 |
Thanks for the help guys, I have it working now. |
| 02-23-2005, 08:27 AM | #10 |
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. |
