Staredit Network

Staredit Network -> UMS Assistance -> [SOLVED] "Stamina" Health - Movement
Report, edit, etc...Posted by PyroDog on 2006-05-16 at 16:07:06
In one of the maps that I am currently constructing, I am trying to make it so that:

When Player 1's unit moves, the stamina meter (which is a custom point leader board) will begin to go down in number. Essentially, every time that that unit moves, the amount of points that player has on the leader board will begin to whittle down. HOWEVER, when the unit is still, the amount of points the unit has the leader board will slowly begin to go UP.

I -have- done this trigger in the past, and I know for a fact it's a fairly simple one if done properly. I have created a location that'll center around the appropiate unit at all times. I believe the trigger I'm trying to create is done by using the "anywhere" location and the location that is always centered around that particular unit.

Thanks.
Report, edit, etc...Posted by Noober on 2006-05-16 at 16:29:32
Whoever brings at most 0 unit to small.
=====
Modify score for current player: Subtract 1 custom.
Center location "small" on unit owned by whoever at anywhere. (small should be like half grid sized)
Set deaths for whoever: Set to 0 for random unit.
Preserve.
-That's for losing stamina.

Whoever brings at least 1 unit to small.
=====
Set deaths for whoever: Add 1 for random unit.
Preserve.
-That's to begin stamina recovery process.

Whoever suffers at least 12 deaths of random unit. (Assuming you're using hypers, that's 1 second to recover 1 stamina.)
=====
Set deaths for current player: Set to 0 for random unit.
Modify score for current player: Add 1 custom.
Preserve.
-That's the actual stamina recovery.

Whoever's custom score is at most 0.
=====
Move all unit for whoever at "small" to "unmoveable". (Unmoveable is a loc over water, cliff, null, etc.)
Preserve.
-That's to prevent unit from moving when he has 0 stamina.

smile.gif
Report, edit, etc...Posted by Killer_Kow(MM) on 2006-05-16 at 16:30:24
There's a thread about this in the concepts forum, one sec, let me find a link...

http://www.staredit.net/index.php?showtopic=26852

Well, its similar anyway. Check out my demonstration map, it should be helpful.
Report, edit, etc...Posted by Kookster on 2006-05-16 at 17:19:23
QUOTE
I have created a location that'll center around the appropiate unit at all times.


That might be your problem, cause the location is always staying on him, so how can you know hes moving if you have it stuck on him

You need to have your trigger that makes him lose stamina condition be


Conditions:
Current player brings 0 "that unit" to "that location"

Actions:
center "that location" on "that unit"
subtract one stamina
Report, edit, etc...Posted by Noober on 2006-05-16 at 17:27:39
QUOTE(kookster @ May 16 2006, 05:19 PM)
That might be your problem, cause the location is always staying on him, so how can you know hes moving if you have it stuck on him

You need to have your trigger that makes him lose stamina condition be
Conditions:
Current player brings 0 "that unit" to "that location"

Actions:
center "that location" on "that unit"
subtract one stamina
[right][snapback]487540[/snapback][/right]


QUOTE(Noober @ May 16 2006, 04:29 PM)
Whoever brings at most 0 unit to small.
=====
Modify score for current player: Subtract 1 custom.
Center location "small" on unit owned by whoever at anywhere. (small should be like half grid sized)
Set deaths for whoever: Set to 0 for random unit.
Preserve.
-That's for losing stamina.

Whoever brings at least 1 unit to small.
=====
Set deaths for whoever: Add 1 for random unit.
Preserve.
-That's to begin stamina recovery process.

Whoever suffers at least 12 deaths of random unit. (Assuming you're using hypers, that's 1 second to recover 1 stamina.)
=====
Set deaths for current player: Set to 0 for random unit.
Modify score for current player: Add 1 custom.
Preserve.
-That's the actual stamina recovery.

Whoever's custom score is at most 0.
=====
Move all unit for whoever at "small" to "unmoveable". (Unmoveable is a loc over water, cliff, null, etc.)
Preserve.
-That's to prevent unit from moving when he has 0 stamina.

smile.gif
[right][snapback]487518[/snapback][/right]



I often wonder... do people actually read the replies to the post?
Report, edit, etc...Posted by PyroDog on 2006-05-16 at 19:27:09
Thanks! That's exactly how I did it... 2 years ago?
<---- dumb for not remembering

Anyway, thanks for all your input.
Next Page (1)