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

2021/1/11

Enemy movement

Sakuya Sakuya

2021/1/11

#
Im new to programming and I need help, so I want to make an enemie who does certain movements dependig on his hp. So my goal is to have a code where when his hp equals 500hp he goes left and shots around himself in every direction and you have to dodge those shots. Can someone help me with that?
danpost danpost

2021/1/11

#
Sakuya wrote...
Im new to programming and I need help, so I want to make an enemie who does certain movements dependig on his hp. So my goal is to have a code where when his hp equals 500hp he goes left and shots around himself in every direction and you have to dodge those shots. Can someone help me with that?
Basically (in pseudo-code): if (hp<500) moveWithSingleShot(); else moveLeftWithMultipleShots();
Sakuya Sakuya

2021/1/12

#
Thanks!
You need to login to post a reply.