This site requires JavaScript, please enable it in your browser!
Greenfoot back
comandodude101
comandodude101 wrote ...

2013/1/31

Jump(for danpost)

comandodude101 comandodude101

2013/1/31

#
Ok danpost I used ur super scrolling world for jumping in my game but I want them to jump lower and slower so how would I do that?
danpost danpost

2013/1/31

#
In the Wombat class, change the last line in the following:
private void move()
{
    ySpeed++; // adds gravity
    setLocation(getX()+xSpeed/10, getY()+ySpeed);
to
setLocation(getX()+xSpeed/10, getY()+ySpeed/2);
comandodude101 comandodude101

2013/1/31

#
Ok but now im having trouble in my game with removing the main actor then respawning him.
danpost danpost

2013/1/31

#
It probably would be best if you did not remove the main actor from the world and respawn it, but instead just set a new location for it.
comandodude101 comandodude101

2013/2/2

#
Ok know im having trouble setting my "Hero" class as the main actor. Any Help?
danpost danpost

2013/2/2

#
No help. Not without seeing the code in your world class.
comandodude101 comandodude101

2013/2/2

#
]Ok well I think I fixed it
You need to login to post a reply.