Discuss Scratch

WabbaHarry
Scratcher
11 posts

A turn towards?

How would you make an object turn towards something? I know there is the point towards block but lets say you have a person who is shooting something (Like in GTA) if you wanted to fire behind you i would like it if he could turn towards it not just suddenly be facing it as that is a bit glitchy and can result in easy quick turns. I am creating a top down version of GTA but I cant get the shooting and aiming right as i want it to be.

So incase you dont know what i mean I basically want it so if you were to use the actual turning keys it would do the same thing but until it is pointing at the mouse pointer

Last edited by WabbaHarry (Oct. 9, 2013 16:23:46)

Landrover110
Scratcher
100+ posts

A turn towards?

You could have two coustumes one facing one way and the other the othe way
when [left arrow key v] key pressed
switch coustume to [left]
when [right arrow key v] key pressed
switch coustume to [right]

or
when gf clicked
point towards [sprite 2]//your enemy you want to shoot

I hope this helps it may not be what your want since I dont know what your project looks like
hope it helps :

Last edited by Landrover110 (Oct. 9, 2013 16:43:16)


Too much linux
>>>>>>See my projects here <<<<<<
scubajerry
Scratcher
1000+ posts

A turn towards?

I think this is what you are asking for.

http://scratch.mit.edu/projects/13083436/

Last edited by scubajerry (Oct. 9, 2013 16:52:19)

WabbaHarry
Scratcher
11 posts

A turn towards?

scubajerry wrote:

I think this is what you are asking for.

http://scratch.mit.edu/projects/13083436/
Yes Thanks
That is exactly what I wanted but I would speed it up a little bit!
Thanks a bunch
scubajerry
Scratcher
1000+ posts

A turn towards?

WabbaHarry wrote:

scubajerry wrote:

I think this is what you are asking for.

http://scratch.mit.edu/projects/13083436/
Yes Thanks
That is exactly what I wanted but I would speed it up a little bit!
Thanks a bunch

I improved it some.

Powered by DjangoBB