how can i check with input if single string is the same as full string?

hi
so im trying to make a letter check where i have an input string and a string code.
the logic im trying to achieve is that when i interact with object i should get a number string. and im trying to make a string check, checking 1 letter at the time, if the input string is the same as the correct string but i feel very lost

Try this:

@Everynone HUUUUUUGE, actually solved it. i dont know if you single person or a god at programming, thank you so much. hope its not much to ask but

i have materials that is being set, and depending on if its the right letter then it should show green material, and if its wrong letter, then its should show red material. so like if i get the letter half way right and then the last letter is wrong, i want to reset the materials and it should be reuseable.

or better question either how can i use “get all actor of class” to set a static mesh material?
basically wanna make a reset if string is wrong

I’ll ask an even better question. Why use Get All in the first place? Why not reference stuff properly?


But sure,

Get All Actors -> For Each -> Get Mesh -> Set Material

Why not, sounds like it could work, sometimes you need to really get every single one of them.

i just did and the thing is, it sets the material but then some of them get stuck on the material, not really sure how or why. then if i restart and do it again, it will do it again but the stuck ones whill change places


looks something liek this

Maybe post the script? This gives us nothing to work with.


here it is

or a better overview of it

You can’t use Delay in a loop. Call an event in the target actor and have it delay based on the loop index.

why is that?

Read the tooltip of the Delay node.

oooooh i see now, does it also ignore the delay for the “Do once”?

Not sure what that means, but loop waits for no one. DoOnce exists in scope.

ye that was pretty stupid question to ask, but here prob another stupid one, when you say “target actor”, do you mean like the “screen computer” litte component?

Screenshot_20230920_201227_Chrome

This actor. Have a custom event there that takes a float attribute, use it to delay the material change. The Get All Loop would call those events instead.

not sure if its makes a difference but that “get all actor of class” is basically calling it self

Not sure what you mean.

If you want the lighs to change one-by-one, each with a different delay, Delay in the target actor. That’s what I got from you putting the Delay inside the loop.

Perhaps the intent isbnot clear and I assumed too much.

If all of them change simultaneously after some delay, Delay before Get All.

i guess when the code is in right direction, then it shoud light up 1 by 1, but if lets say half way im guessing the code wrong, then all the light should go red then reset (kind of turning off the light)

i did the delay before get all, but still gets stuck on a few of them. maybe im being confused a bit