I've looked around through the forums and tutorials for something specific to this and I cannot find it. I'm needing some guidance for the following three steps:
1) Search for a string in an array and identifying its index.
2) Using that index locate another index by adding or subtracting from the y or x.
3) Taking the value placed in the new index and applying it to an instanced variable.
Thank you for your time.
Develop games in your browser. Powerful, performant & highly capable.
1) Array.indexof("your string") => You will get the X index
2) Array.At(Array.indexof("Your String"),Y Index)
3) Set Variable to Array.At(Array.indexof("Your String"),Y Index)
Ok, the problem I'm having is when I attempt to replace the ("your string") portion with another text variable. Is there a way to apply the quotations after?
I guess to better explain, I'm trying to use ("sprite.AnimationName") there, but placing the quotations makes it search for sprite.AnimationName. When place it without the "" I get a return of -1 of the final variable.
Remove the quotes in that case, quotes are only needed if it's a characters chain.
Do you have a sample capx so I can check what happens?
j0hnbane I answered on your other topic
That answered it, beufreecasse, thank you yet again!