Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | exuin |
So, I want to make a simple non-platformer 2D game. There will be a floor, and the player character walks side to side on the floor. However, I still want the character to be able to jump (it will be completely useless though), so I can’t just not take inputs from the up button. Also, the height of the floor will vary from scene to scene, so I can’t just set it as a variable in the player script. I put the floor height as a variable in the parent node’s script, but that means that I can’t test the player scene itself. What’s the best way to go about doing this? Also, I’d like to be able to get the floor height by just dragging the player instance around the parent scene instead of just setting it as a variable.