I´m making a hero survival map and each hero ofc has a veterancy behavior. i actually got 2 questions on things i haven´t figured out:
When someones hero dies, it loses its veterancy level. So the game has 4 player coop if 3 players die in a round and 1 survives the others will respawn beginning next round but start at veterancy level 0 again. How do i somehow stor the veterancy level to reapply when the unit gets respawned?
I have a shop where you van buy upgrades that will allow restricted abilities on the hero's commandcard. Is it possible to have a requirement that will only allow upgrades on the shop for heroes with a lets say 10 or higher veterancy level?
@Rice87: Go
RE: 1
Usually the easiest way to make heroes is to have a revive system in place and make it so they never really "die" (see Valerian Death Prevention behavior). The idea is that when they are hit by the killing blow it doesn't actually kill them but makes them invisible, invulnerable and have no collision for some time and then moves them to a respawn location before making them visible again. This way, nothing about the hero has to be saved prior to death as you are still using the same unit because it never really died.
@Rice87: Go
Ad. 2
I don't know the solution with pure data, but combination with triggers should work:
In DATA:
Dummy Upgrade called f.e "Level" with max level set.
Now you can create requirements that base on this dummy upgrade and apply them to your buy abilities.
In TRIGGERS:
Everytime hero gains level (there is a event for that) increase owning player's dummy upgrade +1.
If you use Interact ability on your shop, you will run in some troubles tho, because interact only shares
control and requirements will be checked against player who owns shop.
Hey, So what you are saying is, Apply this behavior and it will make the unit invisible have no collision(for some time) invulnerable And then it will be moved to a respawn location. I assume moving it to this respawn location happens with triggers? what happens to the death animation of the unit? What do i do with my triggers that are referenced to the death event of a hero? does the behavior have all these things on the whole time the behavior is active? so i just remove the behavior with triggers at the time the unit has to respawn?
thnx for the anwser, sry for the questions, it just saves me a lot of time :)
Hey, thnx man sounds like a pretty awesome idea, cant believe i didnt think of it myself.
just to be sure:
So i make an upgrade, make a trigger that sets the upgrade for a player +1 whenever his hero levels.
Then i can refer to the upgrade in the requirements and see it as the current herolevel for the player.
Hey, So what you are saying is, Apply this behavior and it will make the unit invisible have no collision(for some time) invulnerable And then it will be moved to a respawn location. I assume moving it to this respawn location happens with triggers? what happens to the death animation of the unit? What do i do with my triggers that are referenced to the death event of a hero? does the behavior have all these things on the whole time the behavior is active? so i just remove the behavior with triggers at the time the unit has to respawn?
thnx for the anwser, sry for the questions, it just saves me a lot of time :)
Yes you will have to move the unit with triggers. Upon the hero gaining the behavior, create an actor of that hero, face it in the direction of the dying hero, play its death animation. Change your "death event" triggers to be instead triggered on the "Apply Behavior" effect that is activated when the hero receives his "fatal" hit. Yes, just remove the behavior with triggers or make it have a duration if the respawn time is dynamic.
So your heroes should all have the Hero Death Prevention behavior, which, when receiving fatal damage, modifies the damage to 0 and applies the hero's "death" behavior, which is the behavior you use to make it invisible, invulnerable, not selectable, no attack, no collision, etc.
For 1 you don't need a behavior. Under the unit's info in the data editor there is a field called Stats - Death time. If you put a number in that field the unit will still exist on the map to be revived by abilities or triggers for that amount of time. The unit will also be invisible, unelectable and everything, completely unnoticeable except be abilities that can target Dead units.
Thnx again for the help, both problems i could handle very smoothly, for anyone who needs it, i just set the death time of the hero to over 9000 ;] and this is the trigger i run whenever a wave is done so that any dead players will be revived.
Hey ppl,
I´m making a hero survival map and each hero ofc has a veterancy behavior. i actually got 2 questions on things i haven´t figured out:
thnx for the time!
@Rice87: Go RE: 1 Usually the easiest way to make heroes is to have a revive system in place and make it so they never really "die" (see Valerian Death Prevention behavior). The idea is that when they are hit by the killing blow it doesn't actually kill them but makes them invisible, invulnerable and have no collision for some time and then moves them to a respawn location before making them visible again. This way, nothing about the hero has to be saved prior to death as you are still using the same unit because it never really died.
@Rice87: Go Ad. 2
I don't know the solution with pure data, but combination with triggers should work:
In DATA:
Dummy Upgrade called f.e "Level" with max level set. Now you can create requirements that base on this dummy upgrade and apply them to your buy abilities.
In TRIGGERS:
Everytime hero gains level (there is a event for that) increase owning player's dummy upgrade +1.
If you use Interact ability on your shop, you will run in some troubles tho, because interact only shares control and requirements will be checked against player who owns shop.
@peranzormal: Go
Hey, So what you are saying is, Apply this behavior and it will make the unit invisible have no collision(for some time) invulnerable And then it will be moved to a respawn location. I assume moving it to this respawn location happens with triggers? what happens to the death animation of the unit? What do i do with my triggers that are referenced to the death event of a hero? does the behavior have all these things on the whole time the behavior is active? so i just remove the behavior with triggers at the time the unit has to respawn?
thnx for the anwser, sry for the questions, it just saves me a lot of time :)
@maticpl: Go
Hey, thnx man sounds like a pretty awesome idea, cant believe i didnt think of it myself. just to be sure:
So i make an upgrade, make a trigger that sets the upgrade for a player +1 whenever his hero levels. Then i can refer to the upgrade in the requirements and see it as the current herolevel for the player.
Yes you will have to move the unit with triggers. Upon the hero gaining the behavior, create an actor of that hero, face it in the direction of the dying hero, play its death animation. Change your "death event" triggers to be instead triggered on the "Apply Behavior" effect that is activated when the hero receives his "fatal" hit. Yes, just remove the behavior with triggers or make it have a duration if the respawn time is dynamic.
So your heroes should all have the Hero Death Prevention behavior, which, when receiving fatal damage, modifies the damage to 0 and applies the hero's "death" behavior, which is the behavior you use to make it invisible, invulnerable, not selectable, no attack, no collision, etc.
@peranzormal: Go
ok thnx man, i will try this soon!
@Rice87: Go
Yup, I also suggest using Tip field when creating an reqirement, and putting there f.e "- Level 10", it will look much cooler :P.
For 1 you don't need a behavior. Under the unit's info in the data editor there is a field called Stats - Death time. If you put a number in that field the unit will still exist on the map to be revived by abilities or triggers for that amount of time. The unit will also be invisible, unelectable and everything, completely unnoticeable except be abilities that can target Dead units.
@Spoolofwhool: Go
Hey thnx for the reply, this way seems more simple and less work for me, im gonne try it, thnx!
Thnx again for the help, both problems i could handle very smoothly, for anyone who needs it, i just set the death time of the hero to over 9000 ;] and this is the trigger i run whenever a wave is done so that any dead players will be revived.
Your welcome and just 1 little point of interest. If you put death time to -1 then the unit will never disappear.