1 decade ago by Pence
Hi there,
Im very new to coding and have a graphic design background, but have been enjoying playing with impactjs.
Im making a very basic mario/sonic style side scroller but have 2 problems relating to entites.
My first, and main problem is that i have absolutely no idea how to kill my player and have him restart the level. I want to make a transparent entity so when the player comes into contact with it he dies and restarts from a set point (dependant on where he dies - or the beginning of the level if this is too complicated).
My second, and this would just be a nice to have, is a spring type entity like in Sonic, so that when the player jumps on the entity he can jump 5X higher than he can usually.
Please can someone help me out with the code for these entities? As mentioned this is my first coding experience and although im finding my feet slowly i am really struggling with these two problems.
Many thanks
Im very new to coding and have a graphic design background, but have been enjoying playing with impactjs.
Im making a very basic mario/sonic style side scroller but have 2 problems relating to entites.
My first, and main problem is that i have absolutely no idea how to kill my player and have him restart the level. I want to make a transparent entity so when the player comes into contact with it he dies and restarts from a set point (dependant on where he dies - or the beginning of the level if this is too complicated).
My second, and this would just be a nice to have, is a spring type entity like in Sonic, so that when the player jumps on the entity he can jump 5X higher than he can usually.
Please can someone help me out with the code for these entities? As mentioned this is my first coding experience and although im finding my feet slowly i am really struggling with these two problems.
Many thanks