I recently purchased your great asset and I'm trying to modify it a little to fit my needs more.
I am building this on your example of Hover over the dialogue option. However, I want to use PlayMaker for more control over what is being shown on the canvas I activate when hovering over (also using your example to activate the GameObject with my FSM).
What I want to do is update the "skillToCheck" variable within the Dialogue System to whatever is typed in the Description or another Custom Field I have on the Dialogue Entry. I want this to be updated on hover so then my PlayMaker FSM (also activated on hover) can just get the dialogue system variable from the dialogue system so I can further use it in my FSM.
I don't know if I've made myself clear and sorry if I am confusing you but basically I want the skillToCheck Dialogue System variable to change to whatever the description or another field is on the Dialogue Entry.
Hope I have made myself clear,
Thank you!
Attachments
Screenshot 2024-12-17 at 12.45.17.png (171.68 KiB) Viewed 413 times
Screenshot 2024-12-17 at 12.44.33.png (83.69 KiB) Viewed 413 times
It might be easier with a bit of code rather than Playmaker. But you could always turn the code into a custom Playmaker action. Putting a script like this on the Dialogue Manager should do it:
using UnityEngine;
using PixelCrushers.DialogueSystem;
public class SetSkillToCheckVariable : MonoBehaviour
{
public void OnConversationLine(Subtitle subtitle)
{
var skillToCheck = Field.LookupValue(subtitle.dialogueEntry.fields, "Description");
DialogueLua.SetVariable("skillToCheck", skillToCheck);
}
}
It sets the DS variable "skillToCheck" to the value of the current dialogue entry's Description field.
This doesn't seem to work.
The variable is not updated even if I hover or if I select the response.
The reason I want to use PlayMaker and sync the string from Dialogue System to PlayMaker variable is to make it easier for me to use templates for skill checks I make within PlayMaker.
Is there a way I can modify the already ActivateOnResponseHover.cs script from your example to update the Dialogue System variable on hover?
I'm not great at coding... (hence the usage of PlayMaker )