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

2021/2/26

How to move without human control

TheGalaxysWolf TheGalaxysWolf

2021/2/26

#
Hi, I am trying to make a seal move around in circles, but when I put in code used to make other things move, I can't. Can you please help me? I don't want to move it, but for it to move by itself. Thank you.
TheGalaxysWolf TheGalaxysWolf

2021/2/26

#
This is for Java not Stride
danpost danpost

2021/2/26

#
TheGalaxysWolf wrote...
Hi, I am trying to make a seal move around in circles, but when I put in code used to make other things move, I can't. Can you please help me? I don't want to move it, but for it to move by itself.
Please show what you have tried.
mariq_rasyid29 mariq_rasyid29

2021/2/28

#
u can use
private int velocity=3;

setLocation(getX()+velocity);
that is for movement vertical
private int velocity=3;

setLocation(getY()+velocity);
this is for movement horizontal
danpost danpost

2021/3/1

#
You will need a center point, a radius, an initial angle and a direction (5 int values).
You need to login to post a reply.