How to find a word that match of condition in a sentences

Hi
I have variable string about: weapon1, weapon2, weapon3, armor1, armor2, armor3, shield1, shield2, shield3

it gonna check if that sentence that contain word" weapon", it will chose weapon1, weapon2, weapon3( not choose shield,armor)
same as shield and armor, i mean the sentence just need have the word that match condition word
thanks for help

Try this:

But in my opinion it could be easier for you if you used different approach like using object groups and object variables.

my problem is i change the item depend on name of animation of that object :sweat_smile:, so i think strfind is the ez way to do, thanks gigakoks


this is how i do, and yeah it work

If you’re only interested if it contains a string you can use contains

image

image

Oh wow, i dont know it have, thanks Mr.Keith

1 Like