Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Szuran

Show sprite instead of a pain flash?

Question

Is there a way to make the screen show a sprite when you're hurt or when you pick up an item, instead of flashing?

Share this post


Link to post

8 answers to this question

Recommended Posts

  • 0

Not sure if this is the best way to go about it but have you tried using HudMessage to print a graphic on Pickup state of CustomInventory or Pain state of player? "Displaying images" here explains it:

 

Pain:

   PLAY G 4 ACS_NamedExecuteAlways("Hurt_scrn",0,0,0,0) //Execute the script to display the graphic on pain state

 

 

 

Share this post


Link to post
  • 0
6 hours ago, sluggard said:

Not sure if this is the best way to go about it but have you tried using HudMessage to print a graphic on Pickup state of CustomInventory or Pain state of player? "Displaying images" here explains it:

 

Pain:

   PLAY G 4 ACS_NamedExecuteAlways("Hurt_scrn",0,0,0,0) //Execute the script to display the graphic on pain state

 

 

 


What am I doing wrong? I get:

Script error, "EXP38.wad:DECORATE" line 16:
Invalid parameter 'acs_namedexecutealways '

In Player Class, I have:

  Pain:
    PLAY G 4 ACS_NamedExecuteAlways ("Hurt",1)
    Goto Spawn

 

And the script (containedin map 1)

 

#include "zcommon.acs"

script "Hurt" (OPEN)
{
    SetFont("BOLIA0");
    HudMessage(s:"A"; HUDMSG_PLAIN, 0, 0, 0.1, 0.8, 3.7);
}
 
Where's the problem?

EDIT:
for the record, I tried to do this with a texture and with a sprite. Both give an invalid parameter.

Edited by Szuran

Share this post


Link to post
  • 0
On 7/11/2020 at 11:13 AM, Szuran said:

#include "zcommon.acs"

script "Hurt" (OPEN)

 

Your script argument should be "void", no?

script "Hurt" (void)

 

Anyway, I think the problem is calling execute with the same map that's playing. Try putting a "0" for the map argument (which specifies the current map).

Share this post


Link to post
  • 0
On 7/11/2020 at 11:13 AM, Szuran said:

In Player Class, I have:

  Pain:
    PLAY G 4 ACS_NamedExecuteAlways ("Hurt",0)
    Goto Spawn

 

It should go in the 2nd argument's place, where I placed it in bold above.

Share this post


Link to post
  • 0

EDIT

 

I figured it out, no problem herre.

Edited by Szuran

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×