Pages: 1
Topic closed
http://scratch.mit.edu/projects/Natheyecea/357266
Okay, this game is pretty nice now, but I have another little thing I´d like to add to it. Sorry for asking so much, but this is my first game I have made with scratch, and I´m still learning
I have already added sprite2 wich is the other black thin thing. You can also move it around freely, and put it in the blue little pasture in the lower left so it won´t run around and interrupt anything when you don´t use it.
What I want is that when sprite1 is coming near sprite2, sprite2 should run away. If sprite1 are coming near sprite2´s backside, sprite2 will run forward. If sprite1 comes near sprite2´s side, it will turn around and run away from sprite1. If sprite1 are coming near the front (head) of sprite2, it should turn around 90*
Offline
Natheyecea wrote:
http://scratch.mit.edu/projects/Natheyecea/357266
What I want is that when sprite1 is coming near sprite2, sprite2 should run away. If sprite1 are coming near sprite2´s backside, sprite2 will run forward. If sprite1 comes near sprite2´s side, it will turn around and run away from sprite1. If sprite1 are coming near the front (head) of sprite2, it should turn around 90*
I don't think this script meets your specific requirements but give it a try anyways.
(Sprite 2)
<when green flag clicked>
<forever>
<if><< <( distance to sprite 1 <<> 80 )>
<if><( distance to sprite 1 <>> 0 )>
<point in direction( (( direction of sprite 1 <-> 180 ))
<move(10 )steps>
Last edited by shadow_7283 (2008-12-21 12:41:42)
Offline
Topic closed
Pages: 1