Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » wierd mechanic needed for a game
- Gengarlover1000
-
16 posts
wierd mechanic needed for a game
I want to make a game where you have to keep a potato off the ground, you do that by dragging the mouse to an intended direction and it shows a line of where you want to point it, and the potato will go that direction. does anyone know how to do that
the code for it rn
the code for it rn
when green flag clicked
forever
hide
if on edge, bounce
if <mouse down?> then
show
point towards [ mouse pointer]
end
end
- The_Imaginarium
-
1000+ posts
wierd mechanic needed for a game
Do you have a specific problem?
- Jareddddddd
-
1000+ posts
wierd mechanic needed for a game
were not here to do the code for you, but rather to debug and help youre current code run better. We need a specific problem to resolve first to debug it
- Jlerpy
-
1000+ posts
wierd mechanic needed for a game
Where is the line going to be within the game? Because as written, this will make it appear and swivel toward the pointer when you hold the mouse button down, then vanish as soon as you let go.
If you want that to influence the potato, you could give the potato a “point in direction”, then instead of a number, put in “direction of Line” (from Sensing), and a “move X steps” kind of motion (probably plus a “change y by -x” sort of gravity-esque motion.
If you want that to influence the potato, you could give the potato a “point in direction”, then instead of a number, put in “direction of Line” (from Sensing), and a “move X steps” kind of motion (probably plus a “change y by -x” sort of gravity-esque motion.
- Gengarlover1000
-
16 posts
wierd mechanic needed for a game
the little pointer when you hold down the mouse key, it will go opposite of where you move the mouse pointer, and it will only be a straight ine
- Jlerpy
-
1000+ posts
wierd mechanic needed for a game
As in you hold the button down, then drag it, and the sprite moves in the opposite direction from the mouse pointer?
- Discussion Forums
- » Help with Scripts
-
» wierd mechanic needed for a game