Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Dravencour

Making actors essential

Recommended Posts

So I'm starting to get into writing up conversations using the dialog system, and am looking into using them to set up mission objectives for a wad. But I want a way to mark the actors for these conversations as essential (which will prevent players from killing them). I know that Strife did this with its major NPCs, and am looking for a way to do the same, as well as a way to switch essential status off if I plan on having the player kill them later on.

Share this post


Link to post

The INVULNERABLE, BUDDHA, or NODAMAGE flags are your options for this. INVULNERABLE prevents damage entirely, except if it's sourced to something with FOILINVUL ( like telefragging ), meaning that the actor won't react to it at all and therefore won't use its Pain state ( unless it has CAUSEPAIN or the damage source has FORCEPAIN ) BUDDHA prevents the actor from being reduced to below 1 health, except if the fatal damage is sourced to something with FOILBUDDHA ( like, again, telefragging ), and NODAMAGE sets the damage to 0 but still allows the Pain state and affects all damage, no matter what, even telefragging and stuff like Thing_Destroy.

 

You can't set actor flags directly via ACS, but you can create CustomInventory actors that you give to the actor via ACS. Because CustomInventory actors have their Use and Pickup states run by the actor using / picking them up, you can use A_ChangeFlag or similar to modify the user / pickuper's flags, giving you indirect access to actor flag manipulation in ACS.

Share this post


Link to post

Correction: You can only set six flags out of over a hundred via ACS, none of which are applicable as a solution to this at all.

Share this post


Link to post

Why not just make the player feel lonely after committing the murder and also killing the incoming law enforcement, and offer him/her to load last save?

Share this post


Link to post
4 hours ago, printz said:

Why not just make the player feel lonely after committing the murder and also killing the incoming law enforcement, and offer him/her to load last save?

TBH, I don't really plan on including "law enforcement" in my wad. My reason for wanting some actors to be essential is for the same reason game devs often do -- to make sure players don't screw themselves out of important missions and questlines by killing the questgiver. Sometimes this can get annoying, such as with several very hateable characters from Skyrim, but it is what it is.

Edited by Dravencour

Share this post


Link to post
6 hours ago, Arctangent said:

Correction: You can only set six flags out of over a hundred via ACS, none of which are applicable as a solution to this at all.

How many flags do you really need for a quest NPC though? Probably not very many. The main property I'm interested in is APROP_INVULNERABLE, which should do what I want without too much fuss.

Share this post


Link to post

Well, that depends on exactly what flags you are using on your projectile actors, whether or not you're using teleporters, and how secure against cheating you want your game to be.

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
×