HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Hero Revival Help

03-28-2004, 08:32 PM#1
duckduck
In my map, whenever a hero dies, it's supposed to come back alive let's say in 16 seconds. But, it works, except the only problem is that the hero loses all it's items and starts back at level 1 without any expierence points. How do I keep the items, level, and expierence points.
03-28-2004, 08:38 PM#2
Vexorian
As far as I know Hero - Revive (hero) doesn't makes them lose items / experiece
03-28-2004, 08:48 PM#3
tay714man
Do you have a trigger that removes the hero from the game instead of just killing it?

Using the "remove unit from game" action on a unit erases it, not just kills it.

If that's not the problem, send more info about your map and I'll try to help.
03-28-2004, 09:52 PM#4
Bloodlust
like the 2 above said :-P
03-28-2004, 10:01 PM#5
duckduck
Would this work?

Event
-A unit owned by Player 1 dies
-A unit owned by PLayer 2 dies
Conditions
-Hero level of Triggering Unit is equal to 1
Actions
-Remove Triggering Unit from the game
-Wait 8 seconds
-Create 1 Matching Unit for owner of triggering unit at center of playable map facing default building degrees
03-28-2004, 10:03 PM#6
Vexorian
Use Hero - Revive hero (triggering unit) instead of removing the unit and creating another one.
03-28-2004, 10:22 PM#7
duckduck
Thanks a lot
03-28-2004, 11:41 PM#8
duckduck
I found another problem. When ever the hero dies, my food goes back down to 0. Then I can get another hero. I already have the trigger that you can only have one hero, but it still doesn't work. I have a trigger like this that doesn't work

Event
-Unit owned by Player 1 finishes training a unit(hero)
Action
-Wait 1 second
-Replace Farm001 with Farm(1 food) with same life and mana
03-28-2004, 11:55 PM#9
johnfn
why dont you just make a boolean variable and then set it to true when they get their hero? I think that would stop them from getting another one, if thats what you mean.
03-29-2004, 12:06 AM#10
duckduck
I dont know what your talking about.
03-29-2004, 11:07 AM#11
johnfn
  1. Go to the trigger editor.
  2. Hit Ctrl+b
  3. Press the green X in the toolbar.
  4. For variable name, put in "player_1_has_a_hero" (actually it can be whatever you want)
  5. For variable type, select boolean.
  6. For default value, make it false.
  7. Press OK.
  8. You now have a boolean variable.
  9. Exit the variable window.
  10. Go to your trigger where you mentioned before, Player 1 finishes traning a hero.
  11. For conditions, put player_1_has_a_hero equal to false. (boolean comparison)
  12. For actions, after your other actions, put set player_1_has_a_hero to true. (set a variable)
  13. Done!
That is a boolean variable.
03-29-2004, 01:40 PM#12
BattleBotv8.2
Event:
Unit generic event:
A unit is trained

Action:
Remove XHero unit training from owner of trained unit