with my file, when i scroll, sometimes it scrolls too far, AND i was wondering about an array for multiple enemies and how i would go about making a koopa (shell, kicking shell, etc. ) plus i need help with a mario death animation, any help would be appreciated
Maybe you should try setting a boundary, like say if he is walking right, and the terrain is at a certain x position (lets say about 400), then the scrollSpeed becomes zero, and he will be allowed to walk (his xspeed will equal 5 or whatever number you most think is necessary). This technique can also be used for the other side.
as in when mario reaches a certain x position, the terrain scrolls? or as in when mario reaches a certain point in the terrain? its a saturday, im slow:h: oh, and great tutorial by the way
No, Mario isnt scrolling, therefore we dont use him to stop the scrolling. We use the terrain. Example: If terrain is at _x position 50, scrollSpeed = 0 and marioSpeed = 5.
so what you’re saying is to start out with a certain scroll speed? so the terrain is scrolling UNTIL it reaches a certain position, or when it reaches a certain position?
got it… if you think about it, as mario moves, the whole background is scrolling the opposite way, therefore, what you see at the edge of your VISIBLE screen ISNT the x = 0, as x is changing, a possible solution would be to convert a script to make the ground MC move until it reaches a certain point, the question is, how would we go about doing this, my example would be to make an on(Key.isDown()) function to detect when the key is down and making the GROUND scroll during this, and activating the mario running animation, the porblem with this is that it would essentially make mario lock on the center, and im mario games this is not the case, but of course, there are always limitations, especially when it involves my skills. Any other suggestions would be greatly appreciated, or improvements to my plans My other plan would be to make it so in the current view, the left side would be X = 0, and right be x = 400, is this possible? or something of a similar sort?