Computer Science Canada Mapping platforms to an array |
Author: | Azaroth [ Thu Apr 06, 2023 11:06 am ] | ||
Post subject: | Mapping platforms to an array | ||
What is it you are trying to achieve? I'm a bit new to turing, but I'm trying to make a platforming game where you make your own platforms to complete the level. I'm attempting to have each new line be a different value in an array. What is the problem you are having? I cannot figure out how to give each line a new value. Describe what you have tried to solve this problem Again I'm pretty new to this, so I've only ben able to try for statements and other than that I'm pretty clueless Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Please specify what version of Turing you are using 4.1.1 |
Author: | scholarlytutor [ Thu Apr 06, 2023 4:30 pm ] |
Post subject: | RE:Mapping platforms to an array |
It seems to be working for me. I click and drag, and each time I get a new line to show. Just to clarify, are you trying to save the X/Y values of each platform the user creates to use those values later in the game? |
Author: | Azaroth [ Fri Apr 07, 2023 7:15 am ] |
Post subject: | RE:Mapping platforms to an array |
I realize now it’s a bit difficult to see with my current code, but I don’t cls at any point, which means each new line is updating the first sets of x,y coordinates, which would make collision for each of the previous lines impossible. The idea I’m going for is each new line you draw becomes a new platform with its own separate values/variables that can later be used for detections and collisions. |
Author: | wordle [ Thu Dec 21, 2023 4:34 am ] |
Post subject: | RE:Mapping platforms to an array |
check my game https://wordle.cool/game/wordle-uk |