This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2009-03-19 14:51:51

Rob1396
Scratcher
Registered: 2009-03-19
Posts: 1

DUDE how do you shoot?

im trying to make a shooting game and i just cant make my sprite shoot

Offline

 

#2 2009-03-19 17:43:29

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: DUDE how do you shoot?

Depends. I'm supposing the bullet goes from left to right. So:

[blocks]PLAYER SCRIPTS:

<when[ KEY USED TO SHOOT ]key pressed>
<broadcast[ shoot

BULLET SCRIPTS:

<when I receive[ shoot
<show>
<go to[ Player
<repeat until><touching[ enemy
<change x by( 20
<end>
<hide>

ENEMY SCRIPTS:

<when green flag clicked>
<forever>
<if><touching[ bullet
[DAMAGE INFLICTING OR KILLING SCRIPTS]
<end>
<end>[/blocks]


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

Board footer