Page 1 of 1

Damage Per Second Map

Posted: Sat Nov 19, 2016 11:42 pm
by DTDsphere
I made a little map for testing the damage per second on weapons. This works well with weapon/gameplay mods.

It works by spawning in a dormant CyberDemon with 100,000 HP and displays the damage dealt to it. Once the Cyberdemon receives damage the timer will start. The timer gives you 10 seconds before killing you (even through God Mode).

To work out the DPS just divide damage dealt by 10 once the timer ends, easy.

Downlewd: (feel free to mirror, I don't care)
http://www.mediafire.com/file/drqhe0kvf ... dpsmap.wad

Screenshots:
[spoiler]Image

Image

Image[/spoiler]

ACS code:
[spoiler]

Code: Select all

#include "zcommon.acs"
int i=10; //Number of seconds until kill switch

script 1 OPEN { //Show Health
hudmessagebold (s:"dmg ",d:100000 - GetActorProperty(1,APROP_Health);HUDMSG_PLAIN,1,CR_RED,0.95,0.1,1.0,1);
delay (1); //Check every tic
restart; }

script 2 ENTER {
If (GetActorProperty (1,APROP_Health) <100000) { //If Cyberdemon has less than Max Health, activate timer
	i = i-1; //Take away 1 second from timer
	hudmessagebold (s:"Seconds: ",d:(i+1);HUDMSG_PLAIN,2,CR_RED,0.75,0.1,1.0,1);
	if (i<0){ //If timer hits 0
		DamageThing (0,99999999); //Kill player
		terminate; } //Intentionally stops the script from restarting
	delay (34); } //Count down 1 second. 34 tics because next line adds an extra tic delay
delay (1); //Check the first If statement every tic
restart; }
[/spoiler]

Re: Damage Per Second Map

Posted: Sun Nov 20, 2016 3:01 am
by Ænima
simple and yet useful.

reminds me of the map I made ages ago with shot-triggered linedefs for testing weapon accuracy.