the red alert when the marine recive the damage

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
DOOMERO-21
Posts: 1423
Joined: Wed Jan 02, 2008 10:02 pm
Location: Chile

the red alert when the marine recive the damage

Post by DOOMERO-21 »

well like doom3 need a new dinamick about this thing
i see on doom3 3 diferents:
melee
left and right arrow
the normal

almost i take for melee, but i dont know how make this thing works, maybe with acs
Attachments
sctch.png
sctch.png (13.68 KiB) Viewed 557 times
User avatar
Ghastly
... in rememberance ...
Posts: 6109
Joined: Fri Jul 06, 2007 2:34 pm

Re: the red alert when the marine recive the damage

Post by Ghastly »

Probably could be done with a custom damagetype with a custom pain state on the player class which activates an ACS script that displays that image with a HudMessage, though that might be too much work to be worth it.

Would someone mind giving an example?
User avatar
DOOMERO-21
Posts: 1423
Joined: Wed Jan 02, 2008 10:02 pm
Location: Chile

Re: the red alert when the marine recive the damage

Post by DOOMERO-21 »

i was thinking that too ghastly buton doom3 for example exist 3 diferents.

THE blood signs when you recive the damage with melee (specific)
the red arrow (when you made contact with radiocative floors or some zsec attacks
the normal red alert when the damage is almost very significant.

this 3 diferents are specifics.
User avatar
Caligari87
Admin
Posts: 6233
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Re: the red alert when the marine recive the damage

Post by Caligari87 »

This is simple, but it'll only work if the player has the status bar on, with stretching (or some custom statusbar equivalent).

The Doomguy already does "left" and "right" pain looks. Adjust this image to include the bloody arrows and change his "front" pain face to some reasonably generic bloody splat. Melee would be more difficult and probably not worth it. You could even do cool transparent alpha effects if you used PNGs.

8-)
User avatar
DOOMERO-21
Posts: 1423
Joined: Wed Jan 02, 2008 10:02 pm
Location: Chile

Re: the red alert when the marine recive the damage

Post by DOOMERO-21 »

but the image will be very small, is not the point, i want this arrows, and the others appaears on the visor like doom3
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Re: the red alert when the marine recive the damage

Post by HotWax »

I don't know enough about SBARINFO to know if it's possible, but since the status bar already has the ability to indicate pain direction (via the status bar face, as pointed out by Cali), can't a status bar definition be created that would display larger arrows at the edge of the screen? If nothing else, could the whole screen not be set to a giant "status bar face" using a completely transparent image for the default and then arrows with transparency for the "look left/right" frames?

For the melee, the custom damage type is probably going to be the way to go. As for displaying the image, that's trivial:

Code: Select all

script 100 (void) { // Screen scratches
     SetFont("SCRATCH"); // Replace SCRATCH with the name of the image lump in the WAD
     SetHudSize(640, 480, 1); // Set first two values to width and height of image, respectively
     HudMessage(s:"A"; HUDMSG_FADEOUT, 0, 0, 0, 0, 0.5, 0.5);
}
This assumes you want the image stretched to take up the whole screen, hold for half a second and fade over another half second (1 total second of display time). You could also have the script randomly position the image, or adjust the hold times accordingly.
User avatar
DOOMERO-21
Posts: 1423
Joined: Wed Jan 02, 2008 10:02 pm
Location: Chile

Re: the red alert when the marine recive the damage

Post by DOOMERO-21 »

that is for melee?
only i need put a acs execute on the player class right?
about sbarinfo..exist the normal sbarinfo for doom? if exist i like to know if can possible add a acs execute when the information about left/right pain sign can be activate wIth this script.
Last edited by DOOMERO-21 on Tue Sep 02, 2008 4:32 pm, edited 1 time in total.
User avatar
Ghastly
... in rememberance ...
Posts: 6109
Joined: Fri Jul 06, 2007 2:34 pm

Re: the red alert when the marine recive the damage

Post by Ghastly »

DOOMERO-21 wrote:only i need put a acs execute on the player class right?
Yup, in a pain state cooresponding with the melee damagetype. For example, a melee attack with the Claw damagetype, and Pain.Claw on the player class calling ACS_Execute calling HotWax's script.

@HotWax: Isn't SetHudSize supposed to have the resolution that the HudMessage is intended for, instead of the size of the image? Without SetHudSize(1024, 768, 1), the objective display in Q:NA isn't displayed in the right place, on lower resolutions.
User avatar
DOOMERO-21
Posts: 1423
Joined: Wed Jan 02, 2008 10:02 pm
Location: Chile

Re: the red alert when the marine recive the damage

Post by DOOMERO-21 »

mm i see only i need add the traslucent =)
Attachments
M_INJ2.PNG
M_INJ2.PNG (5.72 KiB) Viewed 424 times
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Re: the red alert when the marine recive the damage

Post by HotWax »

Ghastly_dragon wrote:@HotWax: Isn't SetHudSize supposed to have the resolution that the HudMessage is intended for, instead of the size of the image? Without SetHudSize(1024, 768, 1), the objective display in Q:NA isn't displayed in the right place, on lower resolutions.
That's exactly what SetHudSize does -- it sets a "virtual resolution" and then sizes whatever you print larger or smaller so it appears as it would if the user's screen was that resolution. Setting the hud size to match the image dimensions makes it so that the image is stretched (or squashed) to cover the entire screen, which I believe was the intention here.
User avatar
DOOMERO-21
Posts: 1423
Joined: Wed Jan 02, 2008 10:02 pm
Location: Chile

Re: the red alert when the marine recive the damage

Post by DOOMERO-21 »

yes here the results, very good =)

http://www.youtube.com/watch?v=JCGq4Jyb1aY
Locked

Return to “Editing (Archive)”