Unit 3, Lesson 22 - debug help


#1

I need some help debugging one of my student’s games for Unit 3, Lesson 22. The flower grows when it collects rain drops. When it gets to be a large tree, the ladybugs are supposed to be displaced or collide with the tree (we have tried using both codes), but the tree just collects the ladybugs instead of displacing them.
Also, the tree doesn’t always change to dead tree once the lives go under 1 and if it does, it will not stay as a dead tree.

Can someone help me see where the bugs are? Thanks!!


#2

I’m not sure I understand what is supposed to happen to the ladybugs when they hit the tree.


#3

He was hoping the ladybugs would displace (tree.displace ladybug) once they hit the larger tree, but the tree is just collecting them, like the flies and raindrops.

We tried the collide and bounce codes as well, so the ladybugs would just bounce off the tree, but it still only collected them.