Anyway, your dilemma is sort of interesting... what I would do is just add an if-then-else action somewhere RIGHT after the death/spirit animation plays. In the condition for it, check if Controller of Player (Triggering Player) == User. Then move the rest of the actions under the 'Then' part. So that way it looks like the unit is dead and faded out and all, but then if it's CPU it'll never respawn.
I don't really think there is a data solution for this... ^
As requested, I have released a new tutorial on hero revival. This is the system that I will be using in my (still in progress) RPG. It involves using Blizzard's system for campaign heroes, combined with a trigger for some extra stuff.
Part 1:
Right click the video and click watch on youtube to get widescreen/fullscreen. Subsequent parts in the descriptions...
EDIT - SOME FIXES:
Apparently it's firing multiple times, and bugging out for ranged attackers. Someone has mentioned a fix is to:
- change the event to be "Unit Takes Damage". Leave the rest, it should still work fine.
- To prevent multiple fires, make a boolean variable (array of size of number of players, all initially false) and then whenever this trigger runs, check that it's false for the player right away (first action is if-then-else), then if it is (aka 'Then' block), set the variable to be 'true' for that player and do the regular revival actions... and THEN after 20 seconds (aka at the end of this trigger), set it back to false for the player.
@Obatztrara: Go
Added some fixes in the original post...
Anyway, your dilemma is sort of interesting... what I would do is just add an if-then-else action somewhere RIGHT after the death/spirit animation plays. In the condition for it, check if Controller of Player (Triggering Player) == User. Then move the rest of the actions under the 'Then' part. So that way it looks like the unit is dead and faded out and all, but then if it's CPU it'll never respawn.
I don't really think there is a data solution for this... ^
As requested, I have released a new tutorial on hero revival. This is the system that I will be using in my (still in progress) RPG. It involves using Blizzard's system for campaign heroes, combined with a trigger for some extra stuff.
Part 1:
Right click the video and click watch on youtube to get widescreen/fullscreen. Subsequent parts in the descriptions...
Map DL link: Link Removed: http://www.mediafire.com/?qwvgns857w2fno4
EDIT - SOME FIXES:
Apparently it's firing multiple times, and bugging out for ranged attackers. Someone has mentioned a fix is to:
- change the event to be "Unit Takes Damage". Leave the rest, it should still work fine.
- To prevent multiple fires, make a boolean variable (array of size of number of players, all initially false) and then whenever this trigger runs, check that it's false for the player right away (first action is if-then-else), then if it is (aka 'Then' block), set the variable to be 'true' for that player and do the regular revival actions... and THEN after 20 seconds (aka at the end of this trigger), set it back to false for the player.