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

Disabling running when health reaches critical levels

Recommended Posts

*EDIT*: Disregard this opening post and some posts below it, those are pertaining to changing the turbo level (old idea), it's now disabling run.*EDIT*

I'm wondering if it's possible to make a lump entry or whatever the basic marker is called in Slade and make a new entry in a Pwad that changes the turbo level to 65 when health reaches 25 units or lower. It also needs to go back to the default 100 should the player's health raise to 26% or above.


Thank you for your help! It will add much depth to the style of maps I'm developing.

Share this post


Link to post

Reading the begginer's guide now, I'd like to learn more about this sort of thing. Will probably be a while before I learn how to do it, I'm better at audio tutorials.

Well, I'll read up, so far I know every script must be from 1-999, and they have certain types and such.

EDIT: I found this bit that seems to specify 25% and less health! I wonder if I could use this? And if so, how to add the reverse function to it; checking if it's 26% or above.

script 1 (int tid)
{
    if (GetActorProperty (tid, APROP_Health) <= 25)
        print (s:"Thing ", d:tid, " has less than 26 health!!");

Share this post


Link to post

That's where it would get a bit tricky. You wold need to do the turbo command if the health is checked and it is below 25. But when your script checks again if you are still below 25 you wouldn't want to do turbo command again, which would slow the game down and annoy the player with constant turbo messages. You'd need something like this:

// declare these at the beginning of your script
bool healthAbove = true; // assuming you are running this script at the beginning of the level and player health is above 25,
// might be a problem if not the first level might want to give player more than 25 health
bool healthBelow = false;

// here is where your loop starts
if(GetActorProperty (tid, APROP_Health) <= 25)
{
 healthAbove = false;
 if(!healthBelow) // only do this if healthBelow is false
 {
  ConsoleCommand ("turbo 65")
  healthBelow = true;
 }
}

else // health is not less than 25
{
 healthBelow = false;
 if(!healthAbove)
 {
  ConsoleCommand ("turbo 100")
  healthAbove = true;
 }
}


There's probably a lot wrong with the above code (I don't remember a lot of the ACS specifics) but I think that's the basic sequence of events.

Also I'm still not sure how to do something that loops continuously in ACS though other than a while(true) loop, which runs continously and slows the game down.

Share this post


Link to post

Would it be easier to make a script that disables running when health reaches 25% or below? It seems to me it would. And it would probably work better and cleaner.

Share this post


Link to post

I actually found that in situations where your health was initially high and then became critical, you're going to neeed all the high speed running you can get.

Share this post


Link to post

Yeah, I'd rather see an "adrenaline surge" system that gives you a slight boost when critical over Strife's crippling system.

I don't care much about considerations of realism. It's a game, and games where the more you lose (low health), the more you lose (less maneuverability) are not fun. If anything, it encourages cheating or save-scumming just to avoid the hindrance.

Share this post


Link to post
40oz said:

I actually found that in situations where your health was initially high and then became critical, you're going to neeed all the high speed running you can get.


I guess we look at it both ways, while I like your idea, being able to run indefinitely while crippled though wouldn't really be fair, and it could be abused. But making it have a timer for the speed boost? Definitely. Good idea there, man.

But I guess now that I look at it maybe it shouldn't be speed per-say, but more of like impaired movement; yanks to the left and right and such, you can't move as swiftly and directly when half of your body is riddled with bullet holes, scratched off from numerous demon claws, and burnt to a crisp by a variety of fireballs.

Share this post


Link to post

Actually 40oz's suggestion sounds better, because it puts you into choosing whether to be safe and healthy, or injured and powerful.

Share this post


Link to post
printz said:

Actually 40oz's suggestion sounds better, because it puts you into choosing whether to be safe and healthy, or injured and powerful.


Compared to what? My most recent comment or the original?

Share this post


Link to post

I wasn't making the suggestion that the player should be faster when damaged, I just want Platinum Shell to know that speed is a very sensitive factor in Doom's element of fun. Especially regarding monsters such as the chaingunner or archvile, where escaping their attacks is dependent on how quickly you can get out of their visual range. A chaingunner quickly draining your health is also going to make you slower, which in turn gives him more time to shoot you? Please don't do that. I can also expect the extreme frustration of trying to dodge a revenant's homing missiles or Mancubus fireballs with sudden changes in the player's speed. I appreciate you experimenting with cool and new stuff but I think you're better off leaving the player's speed alone in any of your releases.

Share this post


Link to post

RE: Topic -- Don't do this. There is no need to cripple the player when he/she is already badly hurt. Low health is already enough of a punishment, period. Though "realistic", disabling running at critical health is not fun in the slightest. In fact, whatever health level you set as the "critical" level is effectively treated as "death" to me. If I reach it and can no longer move like Doom intended, then I will either immediately load an older save, cheat, or quit and modify the wad to fix the problem. :P

40oz/Gez's suggestion, on the other hand, does sound fun if pulled off right.

Share this post


Link to post

Well yeah, that was what I was getting at. But it shouldn't be available the whole time when you reach critical levels. A timer set that lets you move faster for a fixed amount of time when you reach that level would be fine, so you get up out of there and find some health. DooMguy would be slower than normal when in a non-critical state. But to make him run indefinitely when he's near-death? No. For a decent amount of time when critical? Yes.

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
×