SBARINFO Enemy/Monster/Boss Health Bars?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

SBARINFO Enemy/Monster/Boss Health Bars?

Postby SuperAble » Sun Apr 14, 2019 7:32 pm

Hi, is there a possibility to create a health bar for enemies when targeted via SBARINFO? And does it require anything special i.e. an ACS script when displaying it? Thanks.
SuperAble
 
Joined: 02 Jan 2018

Re: SBARINFO Enemy/Monster/Boss Health Bars?

Postby Empyre » Mon Apr 15, 2019 10:40 am

This isn't in SBARINFO, but it might help you:
https://allfearthesentinel.net/zandronu ... r-v20b.pk3
User avatar
Empyre
The Ultimate Shining Example of Humility
 
Joined: 05 Apr 2007
Location: Garland, TX, USA

Re: SBARINFO Enemy/Monster/Boss Health Bars?

Postby MFG38 » Mon Apr 15, 2019 12:04 pm

Unfortunately not. The only method I know of to create health bars for enemies is by means of an ACS script. Luckily, the wiki has a tutorial/example script.

Chances are there's a way to do it with ZScript as well, though, but I wouldn't know how to even start making that sort of stuff with it.
User avatar
MFG38
 
Joined: 14 Apr 2019
Location: Finland
Operating System: Windows 10/8.1/8 64-bit

Re: SBARINFO Enemy/Monster/Boss Health Bars?

Postby Matt » Wed Apr 17, 2019 2:24 pm

The only way I know how to do this through SBARINFO is to pass along an inventory item using ZScript, but then you might as well just do the whole thing in ZScript.

I don't know how to do the ACS method but if the concern is that the status bar stuff be done through SBARINFO so you neither have to learn ZScript's Screen.Draw* or DrawBar functions nor deal with whatever weirdness might be present through ACS HudMessage use, then the ACS method should be able to set the inventory item counters as well.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
 
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: SBARINFO Enemy/Monster/Boss Health Bars?

Postby Empyre » Thu Apr 18, 2019 12:08 am

The HPBar I linked above works in Zandronum, therefore no ZScript.
User avatar
Empyre
The Ultimate Shining Example of Humility
 
Joined: 05 Apr 2007
Location: Garland, TX, USA


Return to Scripting

Who is online

Users browsing this forum: bimshwel, Void Weaver and 2 guests