Thank you. This is exactly what I needed. I have never used 'method()' before, so your code helped me realize what I was missing. This also allowed me to set that script up properly. I'll be sure to share the game when it's in a more functional state.
phoenix9001
Creator of
Recent community posts
Thank you for the reply. I just cleaned up the main section of code I am having problems with and tried implementing what you sent, but I still can't get it to work. The code above works, but only because of the hard-coded fix I put after the for loop.
I apologize if my code is hard to read because I am entirely self-taught and don't know any standard variable conventions. I want to use a loop so I can dynamically add new buttons.
The ".setImageAlpha" sections are only there for testing purposes so I can see results faster, so my main concern is the array updating portion. This basically just changes a variable that holds information on what is equipped to the player. I am trying to set up a system that will allow me to add more options quickly in the future while modifying as little code as possible. If this isn't enough for you to help me, I can share more of the project, but fair warning, my code is very cluttered right now.
there was one other thing I was trying to do that is less important, but I thought I would still bring it up. I first ran into troubles when I tried setting up the .setCallback in a script so I could reduce the size of my code, but I had similar issues to the above problem where the function couldn't find the variable I wanted to access. my current hard-coded solution is sufficient for my project so no worries if we can't figure this one out.
Hi, I am having issues with the .setCallback function. I am trying to have it change variables in my objects or set different callbacks dynamically in a for loop, but I believe I am having variable scoping problems. If you know of any way to work around this or need me to share more details, please let me know.
Otherwise, everything else is working great, thank you for this great asset.