Hello again, im back with probably another stupid question for my new map. This problem has been around for ages and iv put up with it, but lots of people ar complaining about it so im getting help from you guys.
My qustion is when one of my heroes dies and they are like lvl 5, and when the hero is created again how do i make it so it dosnt reset back to 0?
NOTE: i am NOT reviving the heroes as i do not know how to put them in a changing spot or how to revive them however i am just training the hero again. If revivng is require could you please explain this to me?
I think you do have to revive them. I think the best way to do it is to go into data and give them an infinite death time. Then you'll be able to revive them in triggers.
I do imagine there might be a way to grab their experience in triggers when they die, then when a new unit is created, give them that experience amount. It'd probably be a "unit property" action.
What I did for my map is I checked the "revivable" flag under unit. Then in triggers I revive the unit with the "revive unit" function. I also have to give the revived hero full health because he's revived with none.
Now since you still want to be able to train it, make a dummy train ability, so that when training is complete, a trigger will pick that up and revive the unit beside the structure. This means you have to store the unit in a variable when the hero dies. You can optionally issue a move command to the revived hero to go to the rally point of the structure I believe.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello again, im back with probably another stupid question for my new map. This problem has been around for ages and iv put up with it, but lots of people ar complaining about it so im getting help from you guys. My qustion is when one of my heroes dies and they are like lvl 5, and when the hero is created again how do i make it so it dosnt reset back to 0?
NOTE: i am NOT reviving the heroes as i do not know how to put them in a changing spot or how to revive them however i am just training the hero again. If revivng is require could you please explain this to me?
Thank you so much Bozo out
I think you do have to revive them. I think the best way to do it is to go into data and give them an infinite death time. Then you'll be able to revive them in triggers.
I do imagine there might be a way to grab their experience in triggers when they die, then when a new unit is created, give them that experience amount. It'd probably be a "unit property" action.
What I did for my map is I checked the "revivable" flag under unit. Then in triggers I revive the unit with the "revive unit" function. I also have to give the revived hero full health because he's revived with none.
Now since you still want to be able to train it, make a dummy train ability, so that when training is complete, a trigger will pick that up and revive the unit beside the structure. This means you have to store the unit in a variable when the hero dies. You can optionally issue a move command to the revived hero to go to the rally point of the structure I believe.