How to compare 2 strings

Hi everyone, I am using the CONVAI plugin to interact with an avatar based on AI. I need to compare what the avatar says with what I say (in particular numbers) and if I repeat the same number which has been said by the avatar, them something should happen (the volume should turn up). I am able to get the transcription of what both me and the avatar say, but here I am definetly stuck.
As you can see in the image, on the right there’s the blueprint where, above, I get the transcription of what I say, and below the transcription of what the avatar says, and now I should compare them.
I guess that, first of all, I have to check if the avatar’s transcription is a number, and then, if true, compare it to my transcription. Another thing is that, since the transcription is always updated, I must work always with the last value of the dialogue.

Guys I hope that you have understood my issue, but if not, I can explain better to you if you think you can help me.

Thank you!!

Equal Equal node?

I’ve already tried it but it seems to compare only the first 2 strings and then it doesn’t work anymore.

1 Like

usually equal equal node will compare the whole first string to second string value know? how come it won’t work, maybe can you share your code ss where you try comparing?

1 Like

Yes it works but it compares only the first 2 strings after begin play. Since it’s a conversation it should compare always a pair of strings, not only the first 2 ones

1 Like

no but like that’s where is my confusion, two pair of strings in the sense two words in a single string variable or?

Look at the image that I have attached above, in particulat on bottom left you can see a box where transcriptions are reported. I need to compare Irene’s transcription with Operatore’s one

If something only works for one time and not after then try to determine why that is only firing one time would be my suggestion.

Keep in mind Begin Play only fires one momentary pulse. To keep checking constantly you need fast fire, like using a set timer set to loop or the fast fire UE gives you out of the box the “Event Tick”.

then whenever the reply is completely typed by user and presses on send button, then we can compare and based on that result can be given know