HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Change ownership of hero while hes dead?

08-16-2004, 12:34 PM#1
ASDf00zz
Hi, does anyone know if its possible?
this is how im gonna do it:
i have a skill called "Rage", it makes the units attack faster +++
but it also makes the player lose controll of the hero, so i made a trigger like following:
::::EVENTS::::
Unit - A unit Begins casting an ability

::::CONDITIONS::::
(Ability being cast) Equal to Rage


::::ACTIONS::::
If ((Owner of (Triggering unit)) Equal to Player 1 (Red)) then do (Unit - Change ownership of PlayerHero[1] to Player 2 (blue) and Retain color) else do (Do nothing)

Wait 20 seconds (thats the duration of rage)

If ((Owner of (Triggering unit)) Equal to Player 1 (Red)) then do (Unit - Change ownership of PlayerHero[1] to Player 1 (Red) and Retain color) else do (Do nothing)

ok.. thats the working part..
the heros are revived in a tavern. If the "enraged" player1 hero dies while he is owned by player2(blue) how can i make him come up in the tavern for player1(red) after the 20 seconds have passed?
08-16-2004, 02:28 PM#2
logik
why not have another trigger that detects if the hero dies?

so that if the casting unit dies, revive intstantly, change ownership back... then kill.
08-16-2004, 05:07 PM#3
ASDf00zz
Quote:
Originally Posted by logik
why not have another trigger that detects if the hero dies?

so that if the casting unit dies, revive intstantly, change ownership back... then kill.

nice, didnt think of that :D thx
:D
08-17-2004, 11:29 AM#4
logik
that ok... you might need a variable to store the targeted hero... that will make it easier for reviving them.
08-17-2004, 02:51 PM#5
LegolasArcher
The problem is:
Quote:
If ((Owner of (Triggering unit)) Equal to Player 1 (Red)) then do (Unit - Change ownership of PlayerHero[1] to Player 2 (blue) and Retain color) else do (Do nothing)

Wait 20 seconds (thats the duration of rage)

If ((Owner of (Triggering unit)) Equal to Player 1 (Red)) then do (Unit - Change ownership of PlayerHero[1] to Player 1 (Red) and Retain color) else do (Do nothing)
Player 1 no longer controls the hero. Also, if you're going to have this in multiplayer, it wouldn't work very well. It would only work for player 1, and player 2 would get control of his hero for no reason.