Hey its me again.
Im trying to figure out a way to make power ups that affect the character for as long as the game goes on. so think kirby air ride.
Get a heart hp goes up, pick up a boot and speed goes up, jump height changes with wing power up etc.
at first i was thinking that i could just add an amount of that stat to the already established code
example:
when you collide with the speed power up, destroy the power up and add a number to the horizontal speed
when you collide with the jump power up, destroy the power up and add a number to the vertical speed
the problem is im not sure how exactly i would write this out in code if it is the answer im looking for
Im trying to figure out a way to make power ups that affect the character for as long as the game goes on. so think kirby air ride.
Get a heart hp goes up, pick up a boot and speed goes up, jump height changes with wing power up etc.
at first i was thinking that i could just add an amount of that stat to the already established code
example:
when you collide with the speed power up, destroy the power up and add a number to the horizontal speed
when you collide with the jump power up, destroy the power up and add a number to the vertical speed
the problem is im not sure how exactly i would write this out in code if it is the answer im looking for