Hello, can you tell me if there is a regular condition or extension to check if a certain string contains another string? Thank you very much!
Hello probably you need object or another information. i should open Gdevelop main menu start preview with debugger there you check object- file information or toggle developer tools there so object or file information you see.
Sorry, I didn’t quite understand what you mean, maybe I did not say it clear enough. Perhaps an example could make things clearer: this condition would be something like “if the "string"
string contains "ring"
, execute the action”.
You can use an advanced condition Compare Two strings
Use this to look for a function to find the string
http://wiki.compilgames.net/doku.php/gdevelop5/all-features/expressions-reference#text_manipulation
Maybe this StrFind(string, string) I don’t know, I never test this.
1 Like
Ok, I tried the “Compare two numbers” condition StrFind("string","ring") ≠-1
and it worked. Thank you!
3 Likes