Hello, looking for some unusual puzzle mechanics in a game that i am trying to create. It works around variables and the way how they can be accessed. I am currious if the engine allows something like this:
If i have a variables like this -> s1 : string "1234"; s2 : string "0204"; idx : integer "2"; str : string "";
I know the idx variable has number value 2 this means i would like to get content of s2. And then check if s2 contains character "3" in the string. If it contains character "3" the function would return true to me. In the game the idx changes when player interacts. And the result of change is stored as constant in those s1, s2.. variables. The content of the variable is like information for me what can be done at the moment in the game.
Example:
str = get_string_variable "s"+idx -> dynamically get the content of s2 string
if (str contains "3") then print "character 3 is included in string " + str;