Quick tips on making a "line with HP"?

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!

Moderator: GZDoom Developers

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.

Quick tips on making a "line with HP"?

Postby Kzer-Za » Tue Dec 15, 2020 2:44 am

Judging by the fact that there is an event WorldLineDamaged here https://zdoom.org/wiki/Events_and_handlers, it should be possible to make a line that is not triggered by the simple fact that it was shot at, but a line with a certain amount of hit points. However I could not find further information about it. Could anyone please tell me how to go about it?

Currently I work with maps in Heretic format and just use the line special that simply activates the line when it is shot to open the respective "ice" door. But I'm going to migrate to UDMF sooner or later, and for future reference would like to know whether the following can be achieved:

What I want is to make "ice doors" that can be shattered but only after receiving some amount of damage. And immune to ice damage, so damage type should be taken into account. I thought about just using a solid actor with a parallelepiped model which I would place where the supposed wall/door should be. But that would require finding or making this model (and I haven't done any modelling yet) and scaling it with great precision to avoid having cracks between the supposed "door" object and the actual walls. Or is it still the best way to take?
Kzer-Za
 
Joined: 20 Aug 2017

Re: Quick tips on making a "line with HP"?

Postby NicoTheGoat » Tue Dec 15, 2020 7:40 am

You'll want to set the line's 'health' property to the desired value. Additionally, you'll need to set 'damagespecial' or 'deathspecial' to true if you want to run an ACS script when the line takes damage or "dies".

AFAIK you can't check the damage type from ACS, so you'll have to use an event handler for that.
User avatar
NicoTheGoat
 
Joined: 29 Dec 2019
Discord: Nico#3419
Github ID: nicothegoat
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)

Re: Quick tips on making a "line with HP"?

Postby Cherno » Tue Dec 15, 2020 10:18 am

User avatar
Cherno
 
Joined: 06 Dec 2016

Re: Quick tips on making a "line with HP"?

Postby Kzer-Za » Tue Dec 15, 2020 11:57 pm

Thanks, that's very helpful, I think I can do it now! :) (When I finally migrate to UDMF).
Kzer-Za
 
Joined: 20 Aug 2017


Return to Mapping

Who is online

Users browsing this forum: No registered users and 1 guest