HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Temporarily removing hero from game?

08-24-2004, 05:33 PM#1
Ez8
Hi.

For a spell that I am creating, I need to temporarily remove my hero from the game, let the spell run its course, and then return my hero to the game.

How do I do this?
08-24-2004, 08:19 PM#2
Arohk
Quote:
Originally Posted by Ez8
Hi.

For a spell that I am creating, I need to temporarily remove my hero from the game, let the spell run its course, and then return my hero to the game.

How do I do this?

hide and unhid him
08-24-2004, 08:27 PM#3
HEZZA
Hiding and unhing hero still shows there potrait you can fix this by

hiding him then changin owner to neutral victim then do it back
08-25-2004, 07:45 AM#4
Ez8
Well, that won't do, because your hero will still physically be there.

I didn't say I want my hero to be not visible, I said I want to temporarily remove him from the game.
08-25-2004, 08:49 AM#5
Grater
Switch to Neutral Passive and hide. 90% sure that works.

Otherwise save the hero to the game cache then load it (you may need to store current hitpoints/mana seperately)
08-25-2004, 11:38 AM#6
Coffein
Or you could just move him into an area in a corner and then change the owner to neutral passive.
08-27-2004, 01:20 PM#7
AFB-DieHard
or you could hide him, make him neutral passive and invincible
08-27-2004, 01:46 PM#8
SpadeZ
Cache could work, as Grater has suggested, but it isn't suggested if the map is MP.

What i would do is change the owner of the hero to neutral passive, add kill the Hero. Then when you want the hero back just instantly revive using triggers and change owner ship back. There is no actual way to completely remove the hero and get the Hero back.

Hope this helps.
08-27-2004, 03:21 PM#9
AFB-DieHard
When you revive the hero, doesn't he have full hp then?
08-27-2004, 04:07 PM#10
Ez8
I didn't get the answer that I need, but thanks anyway.
08-27-2004, 04:13 PM#11
SpadeZ
Well Ez8 didn't specify what hp he wanted the unit to return with, either full or equal to when he left. But if you wanted the hp to be the same as before he was revived then just create a integer variable and set the units current hp to the variable then kill then unit, and revive, set the unit's hp equal to the variable using "set life of UNIT to (real(INTEGER VARIABLE))"

08-27-2004, 05:06 PM#12
Eeporgorg
Wouldn't the easiest way be to give him a modified phase shift, and have him use it, then remove it?
08-27-2004, 11:47 PM#13
SpadeZ
Yes that would be the easiest way, but its not as efficient as the other methods. Phase shift only last for a certain amount of time. If you needed to constantly remove the unit at different time spans then you would need a whole heap of custom phase shift spells with different durations.

I would go with the kill/revive unit way, but its up to Ez8. Its a drag that there is no unremove unit action or something similar.

08-30-2004, 02:14 PM#14
Frozzt
Why does the hero has to be removed?