:

: Grrr....dumb locked topic...k i'll be more specific. I mean when ever you move ur hero you lose stamina and when ur stamina is at zero u move slower but, you regain ur stamina. Can it be done? :

:
Have triggers that subtract 1 from the stamina counter (whatever you're using) everytime the unit leaves it's location, then recenter the location.
When it gets to 0 constantly move a burrowed unit for some comp onto the unit to make it move slower. Then when they regen some remove it.
I'll post some triggers if you want.
If you can post please do.
no problem.
We'll need 2 locations for this.
CONDITIONS:
P1 brings exactly 0 unit to location 1.
ACTIONS:
Center location 1 on unit for P1.
Subtract 1 from stamina(custom score or whatever you use) for P1.
Preserve Trigger.
CONDITIONS:
Always.
ACTIONS:
Center Location 2 on unit for P1.
Preserve TRigger.
So far we have 1 location constantly centered and another only centered when the unit leaves it.
CONDITIONS:
P1 stamina is exactly 0.
Switch 1 is clear.
ACTIONS:
Create 1 burrowed zergling at location 2 for computer player.
Set switch 1.
Preserve Trigger.
CONDITIONS:
Switch 1 is set.
ACTIONS:
Move all zerglings at location 2 to location 2. (That's what slows the unit down)
Preserve Trigger.
CONDITIONS:
P1 stamina is at least 1.
ACTIONS:
Remove all zergling for computer player at location 2.
Clear switch 1.
Preserve trigger.
So now we have the ling is created when you have 0 stamina, plus it is constantly moved to the location 2 (which is the location constantly centered on the your unit). Now when stamina is at least 1 the ling is removed and the switch is cleared.
You can have automatic regeneration but it most likely will conflict since the number might go back and forth between 0 and 1, which probably will cause problems.
:

: is there a way tp avoid those problems? :

:
Well just getting rid of automatic regeneration, like refill at certain special spots or use items.
BUt if you want to keep it you might want have it regenerate slowly, like maybe +1 every 5-7 seconds, I dunno you could test a bunch of numbers and see which works best.
Or only regenerate while standing still, that'd probably be the best one.
Oh...okay thanks ill try it. If i have any problems i'll post again but anyone can still feel free to help. thanks phatdiddy.
Or you could just change the trigger that removes the zergling to only fire when they have at least 5 stamina or something

intresting. you could also do that for like, certain "Move points"
like, set it so you only have 5 move points, every it leaves the location, it subtracts 1, then when its at 0, give it to play 12, and wala.

Or just don't center the location anymore and move them to it with a preserve trigger.
or that...

I would do something like this. Keep in mind the triggers would have to stay in this order.
Players: Meh
Conditions: Current Player brings at most 0 Units to "Location"
Actions: Preserve Trigger
-Subtract 1 Deaths for Current Player of Stamina
Players: Meh
Conditions: Current Player brings at least 1 Units to "Location"
Actions: Preserve Trigger
-Add 1 Deaths for Current Player of Stamina
Players: Meh
Conditions: Always
Actions: Center Location "Location" on Unit with Stamina owned by Current Player at "Anywhere"
-Wait... set this according to how fast the unit moves, so that if they're running they'll go outside the location before it recenters.
-Preserve Trigger
I don't feel like reading, but talk to PirateKing. He made an RPG called Legacy of Haean. That uses this exact effect you want.
heh im not sure how you can do it, but it seems your trying to make a diablo-ish map but im pretty sure you can use units for a stamina bar only you can see (like on the bottom)
QUOTE(ShadowBrood @ Aug 20 2004, 02:36 AM)
heh im not sure how you can do it, but it seems your trying to make a diablo-ish map but im pretty sure you can use units for a stamina bar only you can see (like on the bottom)
You mean like their health? No that's impossible since you really can't directly change a units health. Using health would be bad anyway since you need it for well, their health.
Otherwise I don't know what else you could use that would be on the bottom.
Just use a death counter or gas or mins, no problems there.