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

2016/6/8

Shooting with different bullets

MNastasi MNastasi

2016/6/8

#
I am trying to shoot at an object with different bullets. "m" is to shoot one object, "space" is to shoot another from the same rocket. When I fire, only one type of bullet can be shot. For example, if I hit "m", that bullet is launched, then if I hit "space", no bullet of that type is launched. Separately they both work, no errors etc.
danpost danpost

2016/6/8

#
It may be that you are using the 'getKey' method instead of using the 'isKeyDown' method with boolean fields to track the state of the keys.
You need to login to post a reply.