[Logo]
 
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Medic Awareness code  XML
Forum Index -> Druids RPG Go to Page: 1, 2, 3 Next 
Author Message
Moof

Wicked Sick!
[Avatar]
Joined: 06/24/2006 19:42:44
Messages: 433
Location: College Park, MD
Offline

Dru, I checked out the Awareness ability. It turns out that it should be a very, very simple change!

Aside from renaming the classes and files and the obligatory points/prereqs and such, this code in AwarenessEnemyList.uc lns 33-35:

Code:
 if ( P != PlayerOwner.Pawn && P != PlayerDriver
 && (P.IsA('Monster') || P.GetTeamNum() == 255 || P.GetTeamNum() != PlayerOwner.GetTeamNum())
 && (Vehicle(P) == None || (Vehicle(P).bDriving && P.GetVehicleBase() == None)) )
 


Change that to
Code:
 if (P.GetTeamNum() == PlayerOwner.GetTeamNum())
 


That oughta do it!

Moof, Scholar of Ni

Moof (W); Dr. Moof (M); Engimoof (E); Moofgineer (E beta)
[Yahoo!] aim icon [ICQ]
KohanX

Godlike

Joined: 03/04/2006 13:40:23
Messages: 350
Offline

I knew there was a way to do it, I just couldn't think of anywhere it was used. Good work!
320

Wicked Sick!

Joined: 10/11/2005 21:28:38
Messages: 605
Offline

Medic awareness would add an excellent new dimension to the medic class.

KohanX

Godlike

Joined: 03/04/2006 13:40:23
Messages: 350
Offline

Hmm, though, I would like to make sure I know what is being done here.

You are showing how to show an image on specific clients? If I remember correctly, we were having trouble with the 'Medic Halo', because in versus games, the opposing team could see who the medics were. At the time, Druid had thought that if something was there (like a halo), you couldn't mask it to certain players; it was just *there*. Awareness is a perfect example of the opposite, however: only if the target is a monster, not a player, not a vehicle, et cetera, should it show.

So, all we have to do is give everyone a 'Medic Awareness' inventory that targets everyone, nut only shows the cross if the target is a medic (or has a medic weapon readied, or whatever) and on the same team as you, and woohoo!
BotFodder

Wicked Sick!
[Avatar]

Joined: 01/13/2006 15:23:41
Messages: 1239
Location: Florida
Offline

No this is so Medics have an "awareness" bar for players similar to the regular "Awareness" skill.

I use the Futurama Prof. Farnsworth Skin: http://www.disastrousconsequences.com/dcforum/posts/list/1595.page
WM: (DC)BotFodder 170
MM: (DC)BotDoctor 141
AM: (DC)BotBooster 147
http://ericdives.com/ - My DC Newbie FAQ: http://tinyurl.com/lz229
Twitter: http://twitter.com/ericdives
[WWW] aim icon [MSN]
KohanX

Godlike

Joined: 03/04/2006 13:40:23
Messages: 350
Offline

I don't know about anyone else, I think that's sort of pointless, being as how they can already see how much health they and others have, and rather easily, I think.
v0rTeX

Wicked Sick!
[Avatar]

Joined: 12/19/2004 20:59:52
Messages: 562
Offline

KohanX wrote:
I don't know about anyone else, I think that's sort of pointless, being as how they can already see how much health they and others have, and rather easily, I think. 


Actually I disagree. It is true that you can see how much health someone has simply by walking up to them. But there are two problems with that idea.

1) You have to be fairly close to be able to read the numbers
2) You can only see how much health a player currently has, you cannot see their max health

Just because you know how much health they have, doesn't mean you know how much health they can accept from you.

Being able to see a graphical bar that shows roughly what percentage of their max health they have would be a good thing. I know there have been many times when I wondered if it was worth trying to chase people around healing them or if they are already full. Currently the best way to tell is to shoot them and see what happens. Think of the time and lives we could save.

The real trick would be figuring out a way to represent current health, max health, and maximum medic health all in one bar. The normal awareness skill would work but it would look like they just have max health when they might have up to 150 more than that. Or the more likely problem, they would appear to have a full awareness bar, but could be given up to 150 more health and you wouldn't necessarily realize it.
KohanX

Godlike

Joined: 03/04/2006 13:40:23
Messages: 350
Offline

Oooh, you know what would be cool... Have a green bar that represents their health as a percent of their normal max health. To make sure a medic knows when they're full, have white fill in the rest of the space up to 100%. Health past their normal max is represented as an overlain pale blue bar with the same proportions as the first one, using a percent of their post-max health out of 150. Here are a few ASCII representations of various health bar amounts. This is assuming the target has 100 normal health max.
Code:
 @ = Green, O = White, & = Pale Blue
  60: @@@@@@OOOO
 145: &&&@@@@@@@
 250: &&&&&&&&&&


Is that awesome or is that awesome? Kudos to games with overlain health bars (Mega Man Zero and DBZ Budokai, that I can think of...)
Szlat

Wicked Sick!

Joined: 05/18/2005 18:32:41
Messages: 2124
Location: UK
Offline

Given that medics can purchase the regular Awareness skill, you will need the 'medic awareness' bar to be significantly different, so the medics can easily differentiate between enemies and team members. So, I would suggest avoiding the colours green, red and yellow.
KohanX

Godlike

Joined: 03/04/2006 13:40:23
Messages: 350
Offline

I disagree.

Look at it this way... You see a bar. You then go through the following 'if statements':

Is there white on it? It's a Player.
Is there blue on it? It's a Player.
Is there neither white or blue? Shoot it regardless.

Explanation for the third: If it's a player, you'll heal them, and you'll notice the blue as well. If it's a monster, you're shooting it, so good for you. And aside, it would take a single glance to tell if it's a monster or not anyway.

And besides, it's not like Medics really need Awareness that much anyway, so taking it away from them is an option.

You could also put a cross next to the bar or some other differentiating symbol.
Moof

Wicked Sick!
[Avatar]
Joined: 06/24/2006 19:42:44
Messages: 433
Location: College Park, MD
Offline

Dru, you have a private message with a download location for Medic Awareness. Description from my version of the skill:

Informs you of your friends' health with a display over their heads.

At level 1 you get a colored indicator (red, yellow, greeen, or blue).
At level 2 you get a colored health bar.

Red means at or below 33% health; yellow, at or below 66%; green, at or below 100%; blue, over 100%.

You need to be a Loaded Medic level 3 to purchase this skill.
Cost per level: 10, 15. (Max Level: 2)


I also fixed up Mysterial's kinda hacked coloring schemes. The changes in brightness are much more obvious now, and I don't require a clamp() statement. Compare

x = Clamp(255 * (2.f * y), 0, 255);
with
x = 128 + 127 * y;

Moof, Scholar of Ni

Moof (W); Dr. Moof (M); Engimoof (E); Moofgineer (E beta)
[Yahoo!] aim icon [ICQ]
Szlat

Wicked Sick!

Joined: 05/18/2005 18:32:41
Messages: 2124
Location: UK
Offline

Well done Moof.
I notice the original awareness had the boundaries for red and yellow at 25% and 50%. Did you deliberately deviate from that?
KohanX

Godlike

Joined: 03/04/2006 13:40:23
Messages: 350
Offline

I'd put it at 25% and 75%, personally, but that's just me.
Moof

Wicked Sick!
[Avatar]
Joined: 06/24/2006 19:42:44
Messages: 433
Location: College Park, MD
Offline

I like the symmetry in thirds. While I was testing it out this evening, the colors seemed too jerky at the 25% mark, and since the original doesn't "fade" as dramatically, it comes off looking kinda strange.

Short answer: I thought it looked better, felt better, and made more sense this way.

Moof, Scholar of Ni

Moof (W); Dr. Moof (M); Engimoof (E); Moofgineer (E beta)
[Yahoo!] aim icon [ICQ]
v0rTeX

Wicked Sick!
[Avatar]

Joined: 12/19/2004 20:59:52
Messages: 562
Offline

Szlat wrote:
Given that medics can purchase the regular Awareness skill, you will need the 'medic awareness' bar to be significantly different, so the medics can easily differentiate between enemies and team members. So, I would suggest avoiding the colours green, red and yellow. 


That is a good point. I'm just not sure how many options there are for making the indicator different. A bar seems easy to do. Now a pie chart would be wicked sweet but can that be done? If not, maybe players could have a vertical bar instead of a horizontal bar.
 
Forum Index -> Druids RPG Go to Page: 1, 2, 3 Next 
Go to: