To allow you to only jump on the ground, use the following script. The pink blocks labeled "jump" represent a compatible jump script. In most video games, you cannot jump more than a certain number of times, and you cannot jump in midair. The next script makes the sprite rise up at a constant rate and fall back down at a constant rate. The following script "teleports" the sprite upwards, and then has it fall back down at a constant rate, until it lands on a platform. This is very fast but you can adjust the speed by adding a "wait block" before the "change y" block. It was used in the Scrolling Demo project by SampleProjectsTeam.Īnother jumping method which works very effectively and realistic is this. The below script results in the sprite moving up if the up arrow is pressed. The following is commonly used in animations and results in a sprite effectively teleporting upwards, and then downwards again.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |