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

#1 2010-03-03 14:57:41

shamoon
Scratcher
Registered: 2010-02-28
Posts: 7

how to set the axis to the position of another sprite ?

Hey guys.
Im creating a Action fighting game..similar to Tekker/street fighter.
Im stuck on a glitch.. in which

For example.
if two fighters are fighting then suddently. if fighter in the left position ..comes to the right position... then it will still point towards in the rightward direction and not in the oppositie side where the other fighter is standing.. what should i do in order to fix this issue??


in order to this ..will i hve to create create costumes which point in the other direction?? is it somehow possible if i can change the direction of the fighter so that it always point towards..the other fighter??

i allready tried this one below
<if( position of sprite one < position of sprite 2
<point towards( sprite 2

but it doesn't seem to work..
so any ideas??

Last edited by shamoon (2010-03-05 16:14:07)

Offline

 

#2 2010-03-03 15:51:57

Jazman111
Scratcher
Registered: 2010-02-27
Posts: 54

Re: how to set the axis to the position of another sprite ?

Try using broadcast in control.
[blocks]
<broadcast[
[/blocks]
And use when I recieve
<when I receive[


http://i41.tinypic.com/149nj3t.jpghttp://www.danasoft.com/sig/HelloWorld121895.jpg
Either at school or home, Scratch.mit.edu isn't blocked.

Offline

 

#3 2010-03-03 16:24:37

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: how to set the axis to the position of another sprite ?

There's a better way: [set x to ([x position] of [sprite 2])]. That weird block is in Sensing.


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#4 2010-03-03 16:37:44

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

Re: how to set the axis to the position of another sprite ?

http://img694.imageshack.us/img694/1123/17769199.gif


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

Offline

 

#5 2010-03-04 03:00:14

Stickman704
Scratcher
Registered: 2009-01-31
Posts: 1000+

Re: how to set the axis to the position of another sprite ?

^

Pretty much the only way.

In case you didn't understand that he means put that on sprite 1. A flag block above it of course.


Dun dun dun dun dun dun.... dun dun dun dun dun dun...  tongue

Offline

 

#6 2010-03-04 06:06:40

Chrischb
Scratcher
Registered: 2008-07-24
Posts: 1000+

Re: how to set the axis to the position of another sprite ?

And a forever block to make it permanent...


I fall: It's a tragedy. You fall: It's comedy.
Hmph enjoy your fall - I get a lovely spring... without pans of new leaves.

Offline

 

#7 2010-03-05 16:15:09

shamoon
Scratcher
Registered: 2010-02-28
Posts: 7

Re: how to set the axis to the position of another sprite ?

how do i make it so it will always point towars the other figter.. and when it moves..
it moves in the directin where the other figter is standing

Offline

 

#8 2010-03-05 17:20:06

Chrischb
Scratcher
Registered: 2008-07-24
Posts: 1000+

Re: how to set the axis to the position of another sprite ?

Try this:

When green flag clicked
forever
   point towards fighter
   move 3 steps
endforever


I fall: It's a tragedy. You fall: It's comedy.
Hmph enjoy your fall - I get a lovely spring... without pans of new leaves.

Offline

 

Board footer