Jump to content

Knock out state


Recommended Posts

Sorry, I didn't make it clear. I was wondering if the quest is related to invincible NPCs besides setting essential, ghost, and invulnerable flags on them. I'm certain that I've removed all the necessary flags from the NPCs, but I still can't kill them. Therefore, I'm curious if there are any other game mechanics preventing the NPC from dying.

Link to comment
Share on other sites

I probably figure out the reason. Changing the actorbase to non-essential and protected does not affect already spawned NPCs. The related reference still shows an essential status, indicated by "[EP]" instead of "[PP]". This is likely due to the fact that these NPCs were already present in the game world. So, I am wondering if there is a way to change the essential status of already spawned NPCs from essential to non-essential.

Link to comment
Share on other sites

In the Actor Script, there's a non-native function called KillEssential.

; Kills this actor even if essential
Function KillEssential(Actor akKiller = None)
	SetEssential(false)
	SetProtected(false)
	Kill(akKiller)
endFunction

Which you can test from the console. Click on an essential NPC and then send the command. Player is passed as the killer in this example:

cf "Actor.KillEssential" Player

For example, Piper kills Nick

;00002F1F Piper
;00002F25 Nick

00002F25.cf "Actor.KillEssential" 00002F1F

;or the shortened version

2F25.cf "Actor.KillEssential" 2F1F
Link to comment
Share on other sites

Thank you for the information. So, if I understand correctly, I don't need to write the function KillEssential myself. Instead, I only need to type 'Actor.KillEssential Player' in the console, right?
I also noticed something that lee3310 suggested. I have found multiple NPC quests that only contain a single referenceAlias. Some of the referenceAlias only set the NPC to protected, while others set the NPCs to essential. "Even if I use either the console command or papyrus setEssential baseID 0, it won't work, because I guess the referenceAlias will override the setting, right?

 

In this case, besides modifying the mod referenceAlias, is there anything else I can do to override the referenceAlias's setting? (perhaps, force the quest to end?)
Link to comment
Share on other sites

 

I only need to type 'Actor.KillEssential Player' in the console, right?

 

Yes, but you must use the appropriate syntax. Is not 'Actor.KillEssential Player' it is

cf "Actor.KillEssential" Player

 

 

 

"Even if I use either the console command or papyrus setEssential baseID 0, it won't work, because I guess the referenceAlias will override the setting, right?

 

It just kills the actor, don't need to worry if it is an Alias flag, a Base Actor flag or flagged by script functions, KillEssential will change the flags and kill the actor. The same applies if you call the containing functions separately.

I'd use CallFunction because I think that changing the base object you wont change the actor reference, and Actor.SetEssential is an Actor function, but the console setessential works on the base actor:

 

2F25.cf "Actor.SetEssential" 0

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...