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

2012/3/18

Warning shot... I guess...

tallyaka tallyaka

2012/3/18

#
I want to make it so that when one shot is fired using the space bar key, everyone starts to shoot at this guy. How do I do that? This is what I have right now:
        if ("space".equals(Greenfoot.getKey()))
        {
            ready = 1;
            reload = 100;
        }
For now all they do is absolutely nothing... the ready is like this:
        if(ready == 1)
        {
            shoot();
        }
        if (ready == 2)
        {
            runAround();
        }
Help?
Duta Duta

2012/3/18

#
I'd need to see more of your code
tallyaka tallyaka

2012/3/18

#
I think I actually got it to work so it's ok. But thanks!
You need to login to post a reply.