HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Changing color equal to average levels...

10-17-2006, 02:05 AM#1
Ignitedstar
I'm making a map that doesn't really need this feature, but it'd be neat to have.

What it would do is to sum up of each of the player's heroes' levels and average them to a number that rounds up(It'd be cleaner to have no decimals; but either way works). Then, in areas around each dungeon, there is a marker that designates how difficult the area is by color.

For example:

If the average level is equal to 4, then the marker at the first dungeon would be yellow, a way of saying "Not too hard, not too easy".

However, if we use the same average level for a much more difficult dungeon, then the marker at that dungeon would be dark green, which would be "You don't stand a chance".

I have no idea whatsoever as to how to make this. Would someone mind helping?
10-17-2006, 02:54 AM#2
Mystic Prophet
set a variable to (hero level plus all other hero levels/ divided by total hero levels) then you can detect what that number is.
say you have 4 players with heroes at levels 1, 2, 2 and 3. so the average level is two.

the second part of the trigger would compare the average level of the heroes to the average level of the dungeon. so if dungeon level less than or equal to (average hero level -1) then the marker could be light green. If the dungeon level is greater than avg hero level -1 and less than avg hero level +1 it could be yellow, and if it's greater than avg hero level +1 it could be red.

If the markers are done in floating text you will need to set them to a variable when they're created so you can change their color via triggers later on. If they're units you can do the same thing.