How can I do an "IfHealth" Statement but with armor?

General help and assistance forum.
Post Reply
User avatar
yunoguy123
 
Posts: 29
Joined: Sun Mar 12, 2017 7:09 am

How can I do an "IfHealth" Statement but with armor?

#1

Post by yunoguy123 » Mon Jul 16, 2018 7:59 am

This is something with SBARINFO, The hud I have is Similar to the resident evil hud, showing Healthy, Okay, Hurt, Critical, and dead. How can I do the same thing with armor?
Why yes! I did cancel a terrible idea for being terrible!

User avatar
Ænima
Addicted to Zandronum
Posts: 3523
Joined: Tue Jun 05, 2012 6:12 pm

Re: How can I do an "IfHealth" Statement but with armor?

#2

Post by Ænima » Mon Jul 16, 2018 8:12 am

IIRC, you can just do a simple inventory check for “BasicArmor”.
­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­
Doom64: Unabsolved: New weapons, monsters, and gameplay features for coop !


ZandroSkins
: a pack made by our community

User avatar
yunoguy123
 
Posts: 29
Joined: Sun Mar 12, 2017 7:09 am

Re: How can I do an "IfHealth" Statement but with armor?

#3

Post by yunoguy123 » Mon Jul 16, 2018 8:40 am

No, that doesnt seem to work. I made a check for it and after messing about with it for a while I cant get that to work.
If i did it using InInventory It either would not pop up or it would pop it up but never go away after a certain point.
Why yes! I did cancel a terrible idea for being terrible!

User avatar
Ænima
Addicted to Zandronum
Posts: 3523
Joined: Tue Jun 05, 2012 6:12 pm

Re: How can I do an "IfHealth" Statement but with armor?

#4

Post by Ænima » Mon Jul 16, 2018 12:01 pm

Did you try just “Armor”, then?

Start a game, pick up an armor bonus or green armor and type “PrintInv” in the console. It’s one of the things that gets listed when you do that.

I did an armor amount check in Super Skulltag’s hud, it changes the color of the armor bar from green to blue if you have more than 100.
­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­
Doom64: Unabsolved: New weapons, monsters, and gameplay features for coop !


ZandroSkins
: a pack made by our community

User avatar
yunoguy123
 
Posts: 29
Joined: Sun Mar 12, 2017 7:09 am

Re: How can I do an "IfHealth" Statement but with armor?

#5

Post by yunoguy123 » Mon Jul 16, 2018 7:49 pm

Thats what I originally tried because basic armor did nothing and Armor caused errors.
Why yes! I did cancel a terrible idea for being terrible!

User avatar
yunoguy123
 
Posts: 29
Joined: Sun Mar 12, 2017 7:09 am

Re: How can I do an "IfHealth" Statement but with armor?

#6

Post by yunoguy123 » Tue Jul 17, 2018 12:35 am

Okay, im going to give this another shot, see if im missing anything
I LOVE super skulltag by the way
Why yes! I did cancel a terrible idea for being terrible!

User avatar
yunoguy123
 
Posts: 29
Joined: Sun Mar 12, 2017 7:09 am

Re: How can I do an "IfHealth" Statement but with armor?

#7

Post by yunoguy123 » Tue Jul 17, 2018 1:01 am

Okay, so heres how i did it

Code: Select all

			Ifhealth not 1%
	{
	DrawString CONFONT, RED, "Dead", -600,420;
	}
	else
		Ifhealth not 26%
	{
	DrawString CONFONT, RED, "Critical", -600,420;
	}
	else
	Ifhealth not 51%
	{
	DrawString CONFONT, RED, "Hurt", -600,420;
	}
	else
		Ifhealth not 76%
	{
	DrawString CONFONT, RED, "Okay", -600,420;
	}
	else
		Ifhealth not 101%
	{
	Drawstring CONFONT, RED, "Healthy", -600,420;
	}
	
I tried to do that but like this

Code: Select all

	InInventory not armor, 25
	{
	Drawstring CONFONT, RED, "Testing 1", -100, -100;
	}
	else
		InInventory not armor, 50
	{
	Drawstring CONFONT, RED, "Testing 2", -150, -150;
	}
	
Does NOT work.
Why yes! I did cancel a terrible idea for being terrible!

User avatar
yunoguy123
 
Posts: 29
Joined: Sun Mar 12, 2017 7:09 am

Re: How can I do an "IfHealth" Statement but with armor?

#8

Post by yunoguy123 » Fri Jul 20, 2018 11:10 am

Turns out this is a GZDOOM issue not a zandronum issue. sorry.
Why yes! I did cancel a terrible idea for being terrible!

Post Reply