Pages: 1
Topic closed
HI,
I got a question again.
Please check the following script.
http://i.imgur.com/TaTBH.gif
I want to make my sprite walk on the terrians [black] .
If encountering slopes, it goes uphill and then downhill.
This scrpit sort of works but the sprite keeps slightly shaking.
How to solve the problem ?
Thanks in advance.
Offline
I think I found the problem. The shaking problem happens in preview [stage] mode.
It doesn't happen presentation mode.
By the how to make sprites stand [touch] exactly on the terrian ?
In my case, I still can see there is a tiny gap between the sprite and the terrian .
Offline
I'm not really sure... I have always had this problem when creating a script like that. Try looking for a well made platformer (where a sprite walks on terrian) and see how they did it.
maybe try this project?
Offline
Instead of change y by 5 (which makes it jump up too fast), try breaking it up into one pixel jumps instead, like this:
Note it adds up to 5 in the end.
P.S. that last change y by -1 is to ensure it's right on the ground and not 1 pixel above, it must go right where it is, within the first "if touching black" sensor, not outside of it.
Last edited by Kileymeister (2011-06-04 19:34:42)
Offline
i do when flag clicked forever if touching colour black change y by -3
Offline
Topic closed
Pages: 1