Page 1 of 1

Game Messages via ACS

Posted: Wed May 30, 2007 5:08 am
by Kinsie
In the Strife system, to my knowledge, it is possible to script game messages to appear in the top left (or top center, if we're talking raven games here) - look at the guy who gives you information for money in Strife MAP02 for example.

What I'm wondering about is a method of doing the same thing in ACS. Here's a basic example of what I'm thinking about:

GameMsg(string, filter level for the message filter in display options)

Code: Select all

script 99 (void)
{
	AmbientSound("items/quadwearingoff", 127);
	GameMsg("Quad Damage is running out...", Item);
}
Image

Using this, game-relevant information like powerups running out and class-specific stuff could be kept alongside the game messages (a-la Quake) if the modder wished, while plot and level-related stuff could use the usual Print commands.

So, is this way too much work for something too small, or unfeasable, or am I just stupid and there's already some obscure way of doing this?

Posted: Wed May 30, 2007 7:05 am
by Graf Zahl
The command already exists and is called 'log'.

Posted: Wed May 30, 2007 7:08 am
by Kinsie
Graf Zahl wrote:The command already exists and is called 'log'.
Ah, sorry about this then. Doesn't seem to be a page in the wiki for it, so that's probably how I missed it.

Posted: Wed May 30, 2007 7:14 am
by Graf Zahl
It's pretty much an unknown command. ;)

Posted: Wed May 30, 2007 7:51 am
by HotWax
Care to share the parameters, so I can create a wiki page?

Posted: Wed May 30, 2007 12:29 pm
by Graf Zahl
Just like 'print'.

Posted: Wed May 30, 2007 12:41 pm
by HotWax
http://www.zdoom.org/wiki/index.php?title=Log

[EDIT] Also altered [wiki]Built-in ACS functions[/wiki] to include a link to it, and retitled the "Hud Messages" section to the more generic "Messages".

Posted: Wed May 30, 2007 12:43 pm
by Nash
Had it not been for this thread, I wouldn't even know that such an ACS function existed. So much that I had to hack the EXE to do what Kinsie demonstrated. -_- Arghifications!