Underneath there's a function that takes some sort of object that describes which key was pressed. You just need to read the controller and make an object that spoofs the key object with the corresponding key and pass that along to that function. If the key is read inside the same function that executes the inventory change, then start by breaking out the keycheck into its own function. You're doing great.
cool, thanks for the advise . if i get what your saying, have a function to interact with interactable objects but then put a key term on interactable objects to be picked up. when the button is pressed to interact with objects check if it has the key term. if true, pick up.
@@CatskullgamesI think we're on the same page. Basically figure out how it works with the keyboard and spoof that with the controller. It's probably just a string like 'RIGHT_ARROW', or maybe one inside of an object, so when you read d-stick right, you pass along the correct string. If the function that reads the keyboard doesn't have single responsibility, start by splitting it out into {string} key_check(). Then make {string} controller_check().
Underneath there's a function that takes some sort of object that describes which key was pressed. You just need to read the controller and make an object that spoofs the key object with the corresponding key and pass that along to that function. If the key is read inside the same function that executes the inventory change, then start by breaking out the keycheck into its own function. You're doing great.
cool, thanks for the advise . if i get what your saying, have a function to interact with interactable objects but then put a key term on interactable objects to be picked up. when the button is pressed to interact with objects check if it has the key term. if true, pick up.
@@CatskullgamesI think we're on the same page. Basically figure out how it works with the keyboard and spoof that with the controller. It's probably just a string like 'RIGHT_ARROW', or maybe one inside of an object, so when you read d-stick right, you pass along the correct string. If the function that reads the keyboard doesn't have single responsibility, start by splitting it out into {string} key_check(). Then make {string} controller_check().
yes, GDScript uses different syntax but I get it, that is so cool. thanks
Sick vid
thanks
nah. portal doesn't yet it's regarded as one of the best puzzle games ever