Discuss Scratch

Newman699
Scratcher
9 posts

Making a Sprite look at Mouse cursor using costumes instead?

i'm working on a project, and i want the character to look at the mouse cursor, but without turning. so i'd just want to use costumes instead.
i had an idea of using triggers on screen, but i haven't tested it out. i'd definitely like some help. thank you! EDIT: here's an example project for everybody: https://scratch.mit.edu/projects/844789013/

Last edited by Newman699 (May 3, 2023 12:03:43)

rodper6635
Scratcher
100+ posts

Making a Sprite look at Mouse cursor using costumes instead?

PangolinButScripts
Scratcher
2 posts

Making a Sprite look at Mouse cursor using costumes instead?

I have an idea (no clue if this works) so basically you need to make a costume for every degree the object can turn. then, you make a script like this that detects the costume with the direction from another invisible sprite that points at the mouse. unless you wanted to make 360 costumes, though, then you could do this:

if <<(Direction) < [NUMBER]> and <[Direction] > [NUMBER]>> then
switch costume to [EXAMPLE]
end
_---____--__---
Scratcher
100+ posts

Making a Sprite look at Mouse cursor using costumes instead?

Try this


Last edited by _---____--__--- (May 3, 2023 03:05:26)

scoobyng
Scratcher
100+ posts

Making a Sprite look at Mouse cursor using costumes instead?

seprate the head of the carather to a new sprite then make this code on the head model
when green flag clicked
forever
point towards [ mouse pointer]
end
scoobyng
Scratcher
100+ posts

Making a Sprite look at Mouse cursor using costumes instead?

scoobyng wrote:

seprate the head of the carather to a new sprite then make this code on the head model
when green flag clicked
forever
point towards [ mouse pointer]
end
_---____--__---
Scratcher
100+ posts

Making a Sprite look at Mouse cursor using costumes instead?

scoobyng wrote:

seprate the head of the carather to a new sprite then make this code on the head model
when green flag clicked
forever
point towards [ mouse pointer]
end
that would just make the charecter spin

Powered by DjangoBB