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

#1 2007-08-01 12:20:53

Slacker101
Scratcher
Registered: 2007-07-23
Posts: 60

Shooter

This is my question.  I need a bullet to drift towards another sprite but the only thing that lets it drift makes it drift towards as certain spot not a sprite? Any suggestions.

Offline

 

#2 2007-08-01 12:33:30

Slacker101
Scratcher
Registered: 2007-07-23
Posts: 60

Re: Shooter

Also my game is lagging a whole lot.

Offline

 

#3 2007-08-01 14:43:11

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Shooter

repeat until touching <target sprite>
     point towards <target sprite>
     move 5 steps
     wait 0.1 seconds


You can adjust the speed by playing with the number of steps or the length of the wait.
I'd recommend having a wait of at least 0.1 seconds, though, to give the computer time to do other tasks.

Offline

 

#4 2007-08-01 15:30:15

Slacker101
Scratcher
Registered: 2007-07-23
Posts: 60

Re: Shooter

What sprite do I put it on the bullet? And what do I start it with? The repeat requires a number not a sensor.

Offline

 

#5 2007-08-01 15:50:04

Slacker101
Scratcher
Registered: 2007-07-23
Posts: 60

Re: Shooter

Then when I upload it some scripts dont work why is that?

Offline

 

#6 2007-08-01 16:05:54

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: Shooter

Have a look at the scripts here, for how to send a projectile towards the mouse location.

http://scratch.mit.edu/projects/Mayhem/7672


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#7 2007-08-01 16:51:27

Slacker101
Scratcher
Registered: 2007-07-23
Posts: 60

Re: Shooter

That was the biggest help ever Mayhem Thanks! smile

Offline

 

Board footer