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

How to drain health from the player via acs script?

Recommended Posts

In order to make it something of a timed thing, I tried making a script to drain the player's health every second, but I don't know how. I tried using 'takeinventory("Health",1);' but it didn't work. I've got this much:

script 1 open
{
(Need line to take away one point of health)
delay(35);
restart;
}

Share this post


Link to post

These functions are defined in zcommon.acs. That's why you have to use #include "zcommon.acs" at the top of each script lump.

Also, an OPEN script belongs to the world, so you'll probably want to use an ENTER script instead.

Share this post


Link to post

Yeah, you also answered me on the ZDoom Forum. Can't believe I forgot about that. Well, my problem's fixed anyway.

#include "zcommon.acs"
Script 1 Enter
{
DamageThing(1);
Delay(35);
Restart;
}


works like a charm.

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
×