I want the ghosts energy to start generating at zero, but i don't want it to go past 75/250 and then the level up happens and it goes to 100/250 and i don't want the energy to go past that and the levels increase like that!
It's quite simple.
Pre-place the unit's properties so that it starts with 0 energy.
Make a Switch or a Death Count for level 1. When it reaches 75 energy and switch 1 is set then you will modify the energy count to the nearest % to 75/250 but lower than 75.
When you get to level 2 you clear that switch or add another death count. and you do the same but with different values and persentages.
I read BeeR's post but was confused by what he was trying to say, so I thought you might be confused to. I think what BeeR is trying to say is that you have the unit start with 0 energy and you have a custom counter count up on the map. Everytime the custom counter reaches the desired limit for the units level you set his energy to a predefined number below the desired cap (like the most expensive spell cost or something) and then restart the counter.
Though I don't think any real method made to limit his energy would be effective.
Yeah, because the method hu got out of beeR wouldn't work. If you use a spell, the counter is still running. The unit could be at a time when it should be at max energy, but isn't because it used a spell. It would then get a power-up in energy.
And there isn't a condition checking unit energy.
And you can't tell when a Ghost is using it's abilities.
so basically you cant do it. if you want to do a level up sort of thing use beer kegs things except time it using death counters so that when itd normally go to 75 energy( it wont be accurate because you cant detect when a unit uses a spell like chu said) you could then set it to like 30 energy. then when you level up you could time some more death counters to like 150 energy and then when the deathcounters reach the limit you could set the energy to like 100.
lets hope you understand that
<everyone that posted has had colored name>
If the purpous is to prevent the ghost from having some abilitys while still having outhers, just dont give the player the ability to research the ability untell they get to a highenugh level, but if the point is to limit the energy a ghost has avalable, so it only gets a few shots of lockdown, the best way is to set the energy to that level everytime the ghost would be geting close to geting an extra lockdown that you dont want it to have, I admit this is imprasise as all get out, but it's the simplest way to do what I think you want done.
The way I limited spellcaster energy usage in my maps is I would have a custom timer that would give them minerals when it was over. And they would build a nuke and their energy would be set to a certain percentage and after a short period of time it would be set back to 0 and kept there untill they built another nuke.
Ya i decided to just not bother with that part of my map thanks for the help anyway!
