Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do you make functional arrows you can press with your mouse to go left and right with for a program?
- LostAtlanticBoy
- Scratcher
22 posts
How do you make functional arrows you can press with your mouse to go left and right with for a program?
Hello Scratchers who has seen this:
I am having trouble finding inspirations of projects that will help me out with what I want to do. I need help making arrows that will be clicked will make you go left or right in. I have not seen any other projects which sepcifically did this and I want to stand out of having a unique project with a unique way of having people travel through it like that.
Would anyone would like to help me out?
Sincerely,
LostAtlanticBoy
I am having trouble finding inspirations of projects that will help me out with what I want to do. I need help making arrows that will be clicked will make you go left or right in. I have not seen any other projects which sepcifically did this and I want to stand out of having a unique project with a unique way of having people travel through it like that.
Would anyone would like to help me out?
Sincerely,
LostAtlanticBoy
- Wei-ern_520
- Scratcher
500+ posts
How do you make functional arrows you can press with your mouse to go left and right with for a program?
Hello Scratchers who has seen this:In those buttons:
I am having trouble finding inspirations of projects that will help me out with what I want to do. I need help making arrows that will be clicked will make you go left or right in. I have not seen any other projects which sepcifically did this and I want to stand out of having a unique project with a unique way of having people travel through it like that.
Would anyone would like to help me out?
Sincerely,
LostAtlanticBoy
when this sprite clicked //right buttonOf course, you could do better by replacing those when this sprite clicked into a forever if touching mouse pointer and mouse down in a forever loop
change [x v] by (5)
when this sprite clicked //left button
change [x v] by (-5)
when green flag clicked //main sprite to be controlled
forever
go to x: (x) y: (y position)
end
Last edited by Wei-ern_520 (Sept. 14, 2021 01:16:50)
Please consider checking out my suggestion ->here<-.
Hello, I’m Wei-ern_520, and I will randomly appear in your room! Just kidding, I make rpg engines.
I have no custom pfp, not because I don't know how to make one. I just don't know what suits me best, and I'm just too lazy and prefer sticking to simplicity. Or at least so. I also have the need to trip people with my profile picture. Just wait till it happens.
Fun fact: you don't clean your mess, you move it somewhere else. (Source: somewhere)
Also: Ooh, look at the cheese!
- LostAtlanticBoy
- Scratcher
22 posts
How do you make functional arrows you can press with your mouse to go left and right with for a program?
Thanks!Hello Scratchers who has seen this:In those buttons:
I am having trouble finding inspirations of projects that will help me out with what I want to do. I need help making arrows that will be clicked will make you go left or right in. I have not seen any other projects which sepcifically did this and I want to stand out of having a unique project with a unique way of having people travel through it like that.
Would anyone would like to help me out?
Sincerely,
LostAtlanticBoywhen this sprite clicked //right buttonOf course, you could do better by replacing those when this sprite clicked into a forever if touching mouse pointer and mouse down in a forever loop
change [x v] by (5)
when this sprite clicked //left button
change [x v] by (-5)
when green flag clicked //main sprite to be controlled
forever
go to x: (x) y: (y position)
end
- VeryFamus
- Scratcher
1000+ posts
How do you make functional arrows you can press with your mouse to go left and right with for a program?
Here!
Right button
Left button is the same but with -5 instead of 5
Up:
Down is same but -5
Player:
That’s all the advice I have, unless you are making a scrolling platformer! Then put the go x y thing in a backdrop sprite.
Right button
when green flag clicked
forever
if <(mouse down) and (Touching [mouse-pointer]?)> then
Change (x) by (5)
end
end
Left button is the same but with -5 instead of 5
Up:
when green flag clicked
forever
if <(mouse down) and (Touching [mouse-pointer]?)> then
Change (y) by (5)
end
end
Down is same but -5
Player:
when green flag clicked
forever
go to x: (x) y: (y)
end
That’s all the advice I have, unless you are making a scrolling platformer! Then put the go x y thing in a backdrop sprite.
some know me as the guy who only posted in suggestions
i have returned once more
Lamp oil, rope, bombs. You want it? It’s yours my friend. As long as you have enough rupies.
- LostAtlanticBoy
- Scratcher
22 posts
How do you make functional arrows you can press with your mouse to go left and right with for a program?
Still having a bit of trouble with it. Here!
Right buttonwhen green flag clicked
forever
if <(mouse down) and (Touching [mouse-pointer]?)> then
Change (x) by (5)
end
end
Left button is the same but with -5 instead of 5
Up:when green flag clicked
forever
if <(mouse down) and (Touching [mouse-pointer]?)> then
Change (y) by (5)
end
end
Down is same but -5
Player:when green flag clicked
forever
go to x: (x) y: (y)
end
That’s all the advice I have, unless you are making a scrolling platformer! Then put the go x y thing in a backdrop sprite.
- ben_19046
- Scratcher
14 posts
How do you make functional arrows you can press with your mouse to go left and right with for a program?
Hello Scratchers who has seen this:
I am having trouble finding inspirations of projects that will help me out with what I want to do. I need help making arrows that will be clicked will make you go left or right in. I have not seen any other projects which sepcifically did this and I want to stand out of having a unique project with a unique way of having people travel through it like that.
Would anyone would like to help me out?
Sincerely,
LostAtlanticBoy
You have to use this:
if <<key [up arrow or which key u want] pressed?>> then
move (how many u want) steps
end
Last edited by ben_19046 (Sept. 21, 2021 07:00:00)
say [Thank you for your support]
- Discussion Forums
- » Help with Scripts
- » How do you make functional arrows you can press with your mouse to go left and right with for a program?