Hello, i don't know if this was already asked, but since i could not find anything related to this topic here i go:
Is it possible to turn off usables, after such event in a quest? For example, after the player answers correctly to a question the said NPC would get its usable component disabled.
Sorry if this is a basic question, or if it was already answered, yesterday i struggled a lot trying ti find how to do such thing (without looking into code).
Best regards,
João Aguizo
Deactivate usable component [if some condition is met] or [if event is raised]
Re: Deactivate usable component [if some condition is met] or [if event is raised]
Hi João,
Use the SetEnabled() sequencer command to disable the NPC's Usable component. For example, if the NPC says this line:
The {{default}} tells the dialogue entry to also play the Dialogue Manager's Default Sequence.
If you always want to disable the Usable after starting any conversation, you can configure the Dialogue System Trigger to do this. Add Action > OnExecute() event. Configure the event to disable the Usable component.
If you need saved games to remember whether this component was enabled or disabled, add an Enabled Saver component to the NPC.
Use the SetEnabled() sequencer command to disable the NPC's Usable component. For example, if the NPC says this line:
- Dialogue Text: "Correct. You do not need to talk to me again."
- Dialogue Text: "Correct. You do not need to talk to me again."
- Sequence: {{default}}; SetEnabled(Usable,false)
The {{default}} tells the dialogue entry to also play the Dialogue Manager's Default Sequence.
If you always want to disable the Usable after starting any conversation, you can configure the Dialogue System Trigger to do this. Add Action > OnExecute() event. Configure the event to disable the Usable component.
If you need saved games to remember whether this component was enabled or disabled, add an Enabled Saver component to the NPC.