I've written up this code. When you walk over a linedef, it triggers a bloody image to flash on screen using the HUDMESSAGE function of ACS. It also plays a sounds to make the player jump. This is great, but what I really need is a way to have it repeatedly, but periodically play while in a certain area. Is there a way I can do this, and if so, could someone share an example please? My current code is this:
Code: Select all
//FEAR
str bludimage[8] =
{
"TNT1A0",
"BLUD1",
"BLUD2",
"BLUD3",
"BLUD4",
"BLUD5",
};
script 7 (void)
{
int blood = random(1,7);
ambientsound ("mental/blood", 255);
SetHudSize(800,600,TRUE);
SetFont(bludimage[blood]);
HudMessageBold(s:"A"; HUDMSG_FADEOUT, 253, 0, 400.0,300.0, 0.4, 0.3);
}
Thanks in advance.