Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Psyrus

ZDoom - Monster Fragcounter

Recommended Posts

I'm wanting to have something that counts up how many monsters you kill, have it display (using hudmessage I'm assuming), and then have it reset when you respawn after death. It's pretty much just like a fragcount in a deathmatch game.

The problem is I have no idea how to set something like this up even though it sounds ridiculously easy to accomplish. I looked around in zdoom.org/wiki to see what I could do, and it looks like using Thing_Count is involved. Still, I'm at a loss. Any help on how to get this started?

Share this post


Link to post
boris said:

All you need is GetLevelInfo.

I wonder how I missed that.

Well now, the example script compiles but doesn't do anything. GetLevelInfo shows up black in Doom Builder, but I'm using ACC 1.35 and the .acs files its .zip contained.

Edit: I'm using v2.0.96

Share this post


Link to post

Heh, you were right. I didn't have anything activating it. I changed it to an OPEN script, changed print to hudmessage, and configured it to display in the upper-right corner, but it only displays itself once. I'm wanting it to act like a scoreboard showing constantly in the specified corner. Is this possible?

Share this post


Link to post

Yes. Just give the hud message a static id (i.e. not 0) and let your script run in an infinite loop.

Share this post


Link to post

Ok, I got the thing to count the kills and display itself. It's doing so not exactly as I planned, but it'll do for now.

What it's doing differently is that it's counting the total kills made by all players instead of just one player. Due to this, having it reset itself on player death won't work obviously, but as I said, it'll do for now. Thanks for the help.

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  
×