Jump to content

[LE] Enabling an actor


Recommended Posts

Use the same logic as you did before.

I have already post you the name of a few scripts.

There is also the :

defaultEnableLinkedRefOnTriggerEnter

 

The script you are going to use depends on how you want the actor to get Enable.

OnTriggerEnter, OnDeath (of an other NPC), OnActivate (lever or other activator) etc....

Link to comment
Share on other sites

Use the same logic as you did before.

I have already post you the name of a few scripts.

There is also the :

defaultEnableLinkedRefOnTriggerEnter

 

The script you are going to use depends on how you want the actor to get Enable.

OnTriggerEnter, OnDeath (of an other NPC), OnActivate (lever or other activator) etc....

Okay so, I don't know what other scripts you mean, but the defaultEnableLinkedRefOnActivate one isn't working right. The NPC stays disabled when I pull the chain that's supposed to enable him

 

My Linked Ref settings are as follows for the chain and the NPC respectively

 

Chain:

unknown.png

 

NPC

 

unknown.png

 

Also, I have no idea why it shows two Chains here but only one Ulfric on the chain settings

Edited by NiZeKiHo
Link to comment
Share on other sites

Scriptname <YourName> extends ObjectReference

	Actor Property QActor Auto
	{ Actor Ref. to Activate }

Event OnActivate( ObjectReference QRef )
	QActor.Enable()
EndEvent

For Activator... Leaver / Chain etc.

just add this script and fill Properties

Scriptname <YourName> extends Actor

Event OnInit()
	Self.Dinable()
EndEvent

For player lol...

 

your question is perfect... idk even 4 what you are asking...

 

how would I enable an existing but initially disabled NPC with Papyrus?

 

<Actor>.Enable()

here: https://www.creationkit.com/index.php?title=Enable_-_ObjectReference

Link to comment
Share on other sites

Hmmm.. Seems I didn't choose too good of a testing character (Trying to test a close-portcullis then spawn boss thing with a placeholder NPC) that happens when you pull a chain..

Any suggestions for a non-hostile placeholder character I could use for testing?

Link to comment
Share on other sites

Use an animal like a goat.

Okay I try that but it seems no matter what I do, the goat doesn't appear. As in, I can see it's there in creation kit, I didn't disable it (because i'm testing if the script can disable first) but it's not there in the place I put it for whatever reason, like it didn't spawn in.

Link to comment
Share on other sites

 

Use an animal like a goat.

Okay I try that but it seems no matter what I do, the goat doesn't appear. As in, I can see it's there in creation kit, I didn't disable it (because i'm testing if the script can disable first) but it's not there in the place I put it for whatever reason, like it didn't spawn in.

 

Clearly you are doing something wrong. Now let's take this from the start.
1) Place the NPC - goat in your cell.
* Do not link the Npc - goat to anything, just place it. SAVE.
* Don't use an LVL NPC.
2) Go in game to test and see that the NPC is there.
* If you have already done in your cell "Navmesh", don't expect to find the NPC in the position you placed him, AI will kick in and the NPC will start to wandering around.
3) Go back in CK and Link your Activator to the NPC.
* Check that you are using the correct SCRIPT, not all enable/disable script are meant to work with all Activators.
* Link Ref the enable state of the NPC from the Activator's script's property and not from the Activator's reference menu.
* You use the REFERENCE MENU option only when you are going to Link the NPC to an xMarker in which the xMarker is Linked to the Linke Ref of the Script.
IN THIS CASE
YOU DON"T LINK REF THE NPC TO THE ACTIVATOR BUT TO THE xMARKER, AND THEN YOU GO TO THE "ENABLE PARENT" PART OF THE REFERENCE MENU (NPC'S MENU).
THEN YOU CLICK THE "SELECT REFERENCE FROM RENDER WINDOW" AND CLIcK ON THE xMARKER.
4) Go back in game and test.
..................................................................................................
After seeing with well rested eyes and brain the screenshots you posted, is clear the mistake you did.
You used the Link Ref option of the Reference Menu.
(the above has nothing to do with what you are trying to do)
Instead you need to go to "Scripts" press the "Property" button and from there Link the NPC.
Edited by maxarturo
Link to comment
Share on other sites

  • Recently Browsing   0 members

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