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

Actor Health Scripting

Recommended Posts

I need to know if there's anyway to use the actor's health to execute a script for example

if (actorhealhcode == 75)
{
scripts
}
I need this to perfect my healing stations...

Share this post


Link to post

I tried that before on a different map. I don't think it's possible to give a player a TID without scripting.

One more thing... is there any command that sets it so it isn't greater than or equal to but instead between for example do this if his health is between 50 - 75?

Share this post


Link to post
cyber-menace said:

I tried that before on a different map. I don't think it's possible to give a player a TID without scripting.

It is possible. 9479038758 people have done it before, 375983759834 will do it again. If you can't find it, you fail it.

cyber-menace said:

One more thing... is there any command that sets it so it isn't greater than or equal to but instead between for example do this if his health is between 50 - 75?


Like...

if(getactorproperty(thingid, aprop_health) >= 50 && getactorproperty(thingid, aprop_health) <= 75) 
{
// stuff here
}

Share this post


Link to post

Well I got it with a slightly different mix. And actually I found out how to add a TID to the player from a very old post of mine when I was talking about bombs and the thing_destroy command. I have everything in two scripts

script 1 enter
{
thing_changetid (0, 666);
}

script 2 OPEN
{
if (getactorproperty (666, aprop_health) >= 100)
{
Sector_SetColor (1, 0, 0, 255);
}
if (getactorproperty (666, aprop_health) <= 99)
{
Sector_SetColor (1, 0, 255, 0);
}
if (getactorproperty (666, aprop_health) <= 75)
{
Sector_SetColor (1, 128, 255, 0);
}
if (getactorproperty (666, aprop_health) <= 50)
{
Sector_SetColor (1, 255, 255, 0);
}
if (getactorproperty (666, aprop_health) <= 25)
{
Sector_SetColor (1, 255, 0, 0);
}
if (getactorproperty (666, aprop_health) <= 10)
{
Sector_SetColor (1, 0, 0, 0);
}
delay (1);
restart;
}
I got my TID script from stuff that Nanami, The Ultimate Doomer, and Cyb tried to remember. Cyb's worked.

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
Sign in to follow this  
×