hi, complete beginner programmer here, this is literally my first time ever trying something like this, so please don't be too rude about the mess i've made
all i want is for the cannonball that appears when you press x to actually keep going and not just stop when it exits. i thought the _update function should make it repeat until it stops? there is probably something incredibly obvious i'm missing, but i can't see it. granted, i have started feeling quite overwhelmed after working on this for about 1-2 hours, and frustrated, seeing as this was the first time i've felt like i had some actual momentum in gaining some coding skills
anyone see what the issue is?



THERE. WOW, EXPORTING FROM P8 SURE IS SIMPLE AND NOT ESOTERIC AT ALL :D:D:D:D:D:D
i'm so exhausted



Not pretty sure, but seemingly the variable cbx
keeps on resetting on totally a fixed value based on px
, after cbx -= 1
performing just once, so the cannon looks like is "stuck" onto the player.
To solve it, you may inplement a cannon creating function like make_cannon(x, y)
, store that cannon's coords in a table, and make an updating function for cannons independent from the player coords like update_cannon()
, and use a FOR loop to handle all cannons' movements if possible. After that, do not forget to place the function in _update()
loop!
For more, you can refer to that tutorial on making patricle effects, which share the similar mechanics on your expectation.
[Please log in to post a comment]