VGamingJunkie Posted May 13, 2012 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; } 0 Share this post Link to post
Gez Posted May 13, 2012 Instead of trying to take health as if it were an inventory item, use a damage function. Your choice of DamageThing, Thing_Damage, Thing_Damage2. 0 Share this post Link to post
VGamingJunkie Posted May 13, 2012 I get a "Function (Whichever one I try) is used but not defined." error. 0 Share this post Link to post
Gez Posted May 13, 2012 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. 0 Share this post Link to post
VGamingJunkie Posted May 13, 2012 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. 0 Share this post Link to post