Hi, i have a little problem. How can i select an bollean variable from an value of another variable? If crafteditem = knife then set player.knife to TRUE?
I can do it manually :
If crafteditem = knife then set player.knife to TRUE
If crafteditem = axe then set player.axe to TRUE
If crafteditem = bow then set player.bow to TRUE
but how can i set it automatically?
If crafteditem = [X] then set player.[X] to TRUE?
Thanks a lot for help ;)
Develop games in your browser. Powerful, performant & highly capable.
So I've been banging my head against this for nearly an hour, and I don't think this can be done with Booleans, simply because Construct can't (that I can find at least), call boolean names from anything except a drop down menu. If someone knows a way around this I'd love to know.
The best I could come up with is using a Dictonary instead of booleans, toggling their value from 0 to 1 when they key name matches craftedItem.