I'm fiddling with allowing the player to jump in my gta clone. I know in theory how to achieve the results I want, I'm pondering the best solution for it.
The situation is this: when the player presses the "j" key this piece of code runs:
Now, as long as "jump" = 1 how would I go about handling the solid state of objects that are jumpable?
My current idea would be something like this: If jump = 1 and player overlaps for example a car, that cars solid state is set to off, I forsee an issue that if an npc is on the screen at that moment, it would be able to go through the car too?