hi, in my map my hero cannot go outside forever. when he goes outside, there should be a value which goes down and when it reaches 0 it should damage him until he dies (so he has to go inside to replenish his energy.
my first guess is just to take "energy" give it a negative regeneration. and inside maybe some kind of energy regeneration aura?
does someone know how to do this ability? i mean a energy regeneration aura?
or maybe i can make a leaderboard with the energy. is it possible to create a bar in the UI?
There are a few approaches. So you want a trigger or data based version? I'll give you one with a mix.
You need to make two regions at the edge of every area transition you want this to happen for. one near the outside and one near the inside.
then make a trigger so that whenever a unit goes outside (enters the outside region) it changes a variable's value, and whenver a unit enters the inside (enters the inside region) it reverses the variable to the other state.
in each of those triggers you should trigger another that checks the variable then either gives the triggering unit a behavior or revokes a behavior that has two phases. the first phase would be basically a buff that says "you are going to take damage from sun exposure soon" then the next phase applies a periodic damage effect.
i had a very good solution...
i created a boss bar and connected it to the energy of my unit (but you dont need to do that, you could just connect it to a variable and change the variable instead). so its really big and people will put attention to that.
i gave my unit a negative energy regeneration and every 1 second i check the energy and set the value of the boss bar to the value of the units energy.
inside i give the unit energy with a trigger every 5 seconds.
but there is no need to connect it to the energy. it works with a "virtual energy" too.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
hi, in my map my hero cannot go outside forever. when he goes outside, there should be a value which goes down and when it reaches 0 it should damage him until he dies (so he has to go inside to replenish his energy.
my first guess is just to take "energy" give it a negative regeneration. and inside maybe some kind of energy regeneration aura? does someone know how to do this ability? i mean a energy regeneration aura?
or maybe i can make a leaderboard with the energy. is it possible to create a bar in the UI?
thx, Psycho
because noone wants to answer me like always, i answer myself. i found the a good solution, but i dont tell u :-P
@PsychoMC: Go
There are a few approaches. So you want a trigger or data based version? I'll give you one with a mix.
You need to make two regions at the edge of every area transition you want this to happen for. one near the outside and one near the inside.
then make a trigger so that whenever a unit goes outside (enters the outside region) it changes a variable's value, and whenver a unit enters the inside (enters the inside region) it reverses the variable to the other state.
in each of those triggers you should trigger another that checks the variable then either gives the triggering unit a behavior or revokes a behavior that has two phases. the first phase would be basically a buff that says "you are going to take damage from sun exposure soon" then the next phase applies a periodic damage effect.
i had a very good solution... i created a boss bar and connected it to the energy of my unit (but you dont need to do that, you could just connect it to a variable and change the variable instead). so its really big and people will put attention to that.
i gave my unit a negative energy regeneration and every 1 second i check the energy and set the value of the boss bar to the value of the units energy.
inside i give the unit energy with a trigger every 5 seconds.
but there is no need to connect it to the energy. it works with a "virtual energy" too.