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

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

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?
Main maker of Baldi's Basics In Education and Doom: https://zandronum.com/forum/viewtopic.p ... 16#p112416

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

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”.
Image ­ ­
­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­
Doom64: Unabsolved: Doom64 and Diablo2 had a baby


ZandroSkins
: a pack made by our community
Squad Radio: a WASD-powered chat menu, add your own sounds
AeniPuffs: neat blood and puff effects

User avatar
yunoguy123
 
Posts: 20
Joined: Sun Mar 12, 2017 7:09 am
Clan Tag: ACG

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.
Main maker of Baldi's Basics In Education and Doom: https://zandronum.com/forum/viewtopic.p ... 16#p112416

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

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.
Image ­ ­
­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­
Doom64: Unabsolved: Doom64 and Diablo2 had a baby


ZandroSkins
: a pack made by our community
Squad Radio: a WASD-powered chat menu, add your own sounds
AeniPuffs: neat blood and puff effects

User avatar
yunoguy123
 
Posts: 20
Joined: Sun Mar 12, 2017 7:09 am
Clan Tag: ACG

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.
Main maker of Baldi's Basics In Education and Doom: https://zandronum.com/forum/viewtopic.p ... 16#p112416

User avatar
yunoguy123
 
Posts: 20
Joined: Sun Mar 12, 2017 7:09 am
Clan Tag: ACG

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
Main maker of Baldi's Basics In Education and Doom: https://zandronum.com/forum/viewtopic.p ... 16#p112416

User avatar
yunoguy123
 
Posts: 20
Joined: Sun Mar 12, 2017 7:09 am
Clan Tag: ACG

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.
Main maker of Baldi's Basics In Education and Doom: https://zandronum.com/forum/viewtopic.p ... 16#p112416

User avatar
yunoguy123
 
Posts: 20
Joined: Sun Mar 12, 2017 7:09 am
Clan Tag: ACG

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.
Main maker of Baldi's Basics In Education and Doom: https://zandronum.com/forum/viewtopic.p ... 16#p112416

Post Reply