HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger Help ON Mimic Death Spell

11-29-2003, 04:13 AM#1
Progniss
:bgrun:Stumped:bgrun: Ok I am making this hero and his ultimate is going to give him the ability to mimic his own death so that people cannot attack him any more for a while. It Kills the hero and then leaves a corpse on the ground where he was, and while the hero is dieing it plays animations so you cannot see him disapearing(like heros do) but instead killing self death eyecandy. Well the trigger works except for one thing. When I do the item check for an ahnk if he has one remove it then when spell is over give it back. Well heres the spell. (uses to vars)

Variable one: pally_loc this is a "point"
Variable two: pally_ahnk this is an "integer"

Trigger:

E} Unit - Paladin 0003 <gen> Begins casting an ability
C} (Ability being cast) Equal to Resurrection
A} Set pally_loc = (Position of Paladin 0003 <gen>)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item carried by Paladin 0003 <gen> of type Ankh of Reincarnation) Equal to (Item carried by Paladin 0003 <gen> in slot 1)
(Item carried by Paladin 0003 <gen> of type Ankh of Reincarnation) Equal to (Item carried by Paladin 0003 <gen> in slot 2)
(Item carried by Paladin 0003 <gen> of type Ankh of Reincarnation) Equal to (Item carried by Paladin 0003 <gen> in slot 3)
(Item carried by Paladin 0003 <gen> of type Ankh of Reincarnation) Equal to (Item carried by Paladin 0003 <gen> in slot 4)
(Item carried by Paladin 0003 <gen> of type Ankh of Reincarnation) Equal to (Item carried by Paladin 0003 <gen> in slot 5)
(Item carried by Paladin 0003 <gen> of type Ankh of Reincarnation) Equal to (Item carried by Paladin 0003 <gen> in slot 6)
Then - Actions
Set pally_ahnk = 1
Item - Remove (Item carried by Paladin 0003 <gen> of type Ankh of Reincarnation)
Else - Actions
Do nothing
Unit - Kill Paladin 0003 <gen>
Wait 1.00 seconds
!!!! This is where the special effects happen !!!!
Unit - Create a permanent Fleshy (Unit-type of Paladin 0003 <gen>) corpse for Player 1 (Red) at (Position of Paladin 0003 <gen>) facing (Random angle) degrees
Wait 10.00 seconds
Unit - Remove (Last created unit) from the game
Hero - Instantly revive Paladin 0003 <gen> at (Position of Paladin 0003 <gen>), Show revival graphics
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
pally_ahnk Equal to 1
Then - Actions
Hero - Create Ankh of Reincarnation and give it to Paladin 0003 <gen>
Set pally_ahnk = 0
Else - Actions
Do nothing


If you could help me i would really appriciate it thanks :gsmile:
11-29-2003, 04:36 AM#2
Hunter0000
you didn't use the "or" condition, you also dont check to make sure he has multiple anks. as is, the trigger looks to see if all his item slots are filled with anks, then if they are, it removes all of them.

You have to use an integer A loops to serch for them, use a 1-6 on each item slot, add one to pally_ahnk every time it's true. Then at the end, do the add ahnk once for each "one" in pally_ahnk

EDIT: also, the fact that use use destroy last created unit after a 10 second wait will cause problems, store it as a varable before you remove it.
11-29-2003, 04:54 AM#3
Progniss
Thanks ;) Oh i forgot to tell on the map i have trigg that works and it checks to see how many slots have ahnks and it makes you drop all the ahnks except for one so that only one slot can have an ahnk. So i think that might change they way ur doing it though im not sure.
11-29-2003, 11:50 PM#4
ShadowElf2002
Another easier way to mimic the death witout actually killing the unit is to just have it play its death animation. if you play death animation it looks like he has died, and he will even just lay there until he is givin another order. At least thats how I did a similar spell on my map.