Staredit Network

Staredit Network -> UMS Assistance -> A better life system?
Report, edit, etc...Posted by Hotshot on 2005-12-29 at 20:17:08
Alright, I thought my system was pretty clever and original (turns out that variations of it existed before I thought of it; since I play classic, I haven't seen any), but it seems to have some flaws. Here's the way it works:

Heroes start with 40% life out of their total max. When they go to a healing becon, it checks if certaint switches are set. The default lvl 1 switch allows them to heal up to 40%, and as they get more expirience, new switches replace the old ones which allow them to heal for more hitpoints, thus making the heroes gain more 'max life' per level.

The problem is that with six heroes, it turns out that I will probably need to make individual switches for every heal level they acheive for every hero. If I have them start at 40% and want to increase it by 10% per lvl, that's 42 switches I have to make, not to mention having the becon go through 42 probabilities to determine how much hitpoints it's supposed to heal. I don't think that loosing 42/256 switches is going to hurt my map, but writing out this many seems like a huge waste of time, and would make the map somewhat inefficient.

Is there a better hp system alternative, or any good way to optimize mine and make it use less triggers? If I could just have a switch set for a single player, but not the others, then I could do it in 6 triggers or so. Even as I'm writing this, I feel that I'll figure it out within 5 minutes from now, and if I do, I'll just close this thread. Until then if anybody could help me out, I'd appriciate it ^_^
Report, edit, etc...Posted by The_Shattered_moose on 2005-12-29 at 20:29:25
Instead of using switches for their level, simply add 1 death for an unused unit per level gained, use custom score, create counter units in an unused area, etc...
With those systems, you would only need one set of triggers for all the players.
The system would look like this:
Trigger
Players:
¤ The heros
Conditions:
¤ Met level up conditions
Actions:
¤ Add 1 death of map revealer for current player/create 1 "hp" at "unused area"
¤ Other levelup stuff


You would then make the heal system work like this:
Trigger
Players:
¤ The heros
Conditions:
¤ Current player has suffered exactly 1 death of map revealer/Current player brings exactly 1 "hp" to "unused area"
¤ Current player brings 1 "hero" to "heal"
Actions:
¤ Set hp to 50% for hero at "heal"
¤ Other actions (move away, etc..)



If you want to see an example of this in action, heres a test map
Report, edit, etc...Posted by M_s4 on 2005-12-29 at 20:51:00
Like, the shattered moose says, use death counters man. This is pretty simple man. Hopefully, you DO know how to use them. If you don't, then click on the tutorial
http://www.staredit.net/index.php?tutorial=124

That should do it. The only time you should use switches is if there are only two "stages" to follow, or if you are running out of units/players you to make counters of. If you don't wanna use death counters for any weird reason, at least use in-game unit counters. (the ones where you place a certain number of units somewhere) By the way, this has been made many times before.
Report, edit, etc...Posted by PCFredZ on 2005-12-29 at 21:46:01
Ha, you want to know what I did for World of Starcraft 3?

There are separate Heroes you can level up with. Levels are therefore stored separately, in the form of death counts for each Hero.

When you activate the Heal sequence, it does these steps:

1) check which Hero you have
2) subtract death counts for level of specific Hero while adding death counts for Heal level
3) detect Heal level
4) heal as corresponds
5) check which Hero you have again
6) sutract Heal levels while adding death counts for level of Hero

Now, steps 1/2 and 5/6 are actually in the same triggers, respectively. However, I had more than a dozen Heroes, which meant a TON of triggers, ultimately resulting in WoS3's infamous lag when played with 3 or more players. Bad. sad.gif
Report, edit, etc...Posted by Hotshot on 2005-12-29 at 21:56:35
Thanks a lot, moose (and yes, I know how to use death counters and I'm already using them in my map)

After about ten min screwing with it and realizing that putting 'wait' times in for triggers just never seems to work out right, I've got it running perfectly, and saved myself quite a lot of time.

I knew that death counters were better than switches, but since I am still a bit new to using death counters, this idea didn't occur to me tongue.gif
Next Page (1)