Jumping and Stomping on Enemy Solved

As mentioned previously, I have problems keeping the onion to stay on the ground instead of falling off the screen. Well, actually I didn't manage to find the solution, I just deleted the onion character and re created it.


I've also added the collision points for both the characters:





Anyway, after the onion problem , I encountered the jumping problem for Bawang Putih. There is a code called "push self towards a value at a value of force"

So, I've tried it just to see what happens.


And Bawang Putih ended up flying straight up into the air like a rocket and she never came back down.

So, I googled for tutorials and I found this :


and for double jump:


But after trying the code, the jumping does not work. Whenever I pressed the up button, she doesn't jump at all or even move up.




And then I found another tutorial :


This one was really complicated. I think I might have missed out some code because it doesn't work.

I'll go back to my backup file and re analyse my code. But until then, I've resort to my last option by analysing the default's code.

Then I realise I might have created the wrong attribute. I'm not quite sure, but I'll check back on my old codes. 

Here's the list of attributes and what it is for :


And here is Bawang Putih jumping and stomping on onion. After the onion is stomped, it will disappear. It seems to disappear a little too fast, I'll try to fix that and add in Bawang Putih's jump mode.


     







0 comments:

Post a Comment