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

#1 2012-12-05 23:30:19

nightwing23
New Scratcher
Registered: 2012-12-05
Posts: 3

Sensing

I am making a game where you fly and dodge stuff but there is a glitch where if you just sit there and press nothing you dont die Please HELP

Offline

 

#2 2012-12-05 23:52:28

CheeseMunchy
Scratcher
Registered: 2008-10-13
Posts: 1000+

Re: Sensing

It would help to look at the scripts... Can you upload it?


6418,

Offline

 

#3 2012-12-06 13:25:52

nightwing23
New Scratcher
Registered: 2012-12-05
Posts: 3

Re: Sensing

Ok

Offline

 

#4 2012-12-06 15:55:52

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Sensing

Okay, so I see the problem. The only time you check for when you're touching an enemy is when you press up, down, or space, which you don't want. Also, I noticied that you were using a broadcast called "LOSER!!!", but it wasn't doing anything, so try removing it from every script. So instead of using this:

when [space v] key pressed
if (touching [enemy v] ?)
 hide
 broadcast [lose v]
 broadcast [LOSER!!! v]
 stop script
end
More...

Try using this:


when gf clicked
forever
if (touching [enemy v] ?)
 hide
 broadcast [lose v]
end
More...

I hope that this helps!

Last edited by ErnieParke (2012-12-06 15:57:27)


http://i46.tinypic.com/35ismmc.png

Offline

 

#5 2012-12-07 14:13:18

nightwing23
New Scratcher
Registered: 2012-12-05
Posts: 3

Re: Sensing

Thx

Offline

 

#6 2012-12-07 15:36:11

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Sensing

nightwing23 wrote:

Thx

Your welcome! It's always easy to make a mistake when you begin coding. ;)


http://i46.tinypic.com/35ismmc.png

Offline

 

Board footer