I've recently started making a hero / rpg map and you have been a great resource so far. I've been trying to save veterancy levels for units that I have to despawn and later respawn at that veterancy. The only help I've found is this thread, but when I try to implement this with triggers, nothing happens; the spawned unit has level 1.
My approach was to set variables for every player and every kind of hero, ie player 1 hero 1 level and so on. I'd set these ints via an Any Unit gains an Experience Level trigger.
Then I added a while loop into my creation cycle that runs until last created unit has the experience level of player 1 hero 1 level. Obviously for this to work, I set the level saver triggers to off.
What am I doing wrong?
doing it with triggers makes it a whole lot harder... i hope drsuperevil will help ya ps this might be doable if you know how to make auras.
Extremism is never the solution. but then again neither is insanity.
Harder with triggers? Then how is the standard procedure for this kind of problem? And how will an aura save the level of my hero?
I am not sure, if I understand, what you want: You want to remove some units and respawn them later, correct?
Any reason, why you not just hide them, move them to the edge of the map, give them to a neutral player, disable them for some time or do whatever you want without actually removing the unit?
Hm... I guess hiding / showing them is a pretty functional workaround to my problem. No, there's no reason I can't do that and I think I will now, thank you very much ^^
I was just stuck in my way of thinking, I guess.
Hm... ok actually, there might be a problem. What if I want to save the levels / xp / possibly items too for players through a bank and make it recoverable if a player plays the map again some time? Then I'll have to be able to level up units when they spawn for a player who's played the map already. What to do?
Thats another story. You should be able to track the amount of experience a unit has, and you can add experience with the Unit Property functions afaik, or you can use Modify Unit effects. You can make them spend skill points by issuing the order to learn the skills. You can get all items a unit has as a unit group.
You could also try to save the entire unit in the bank, but that is usually not the best option and might not include all the experience, ability levels or items.
You must login to post a comment. Don't have an account? Register to get one!