Discuss Scratch
- Discussion Forums
- » Collaboration
- » Imagine2D
- Ancoder
-
1000+ posts
Imagine2D
https://scratch.mit.edu/projects/557673627/ updated with new functions
- historical_supa
-
1000+ posts
Imagine2D
https://scratch.mit.edu/projects/557673627/ <–turbo mode makes it 0 seconds lol look:
- SuperStickFigures
-
500+ posts
Imagine2D
lolhttps://scratch.mit.edu/projects/557673627/ <–turbo mode makes it 0 seconds lol look:
- Ancoder
-
1000+ posts
Imagine2D
adding keybinds
keyevent.bind("a")
print("Key 'a' was pressed")
end
Last edited by Ancoder (Aug. 3, 2021 15:47:42)
- 37_Scratch
-
1000+ posts
Imagine2D
Something inside me tells that we are making the D programming language… adding keybindskeyevent.bind("a")
print("Key 'a' was pressed")
end
keyevent.bind("a") print("Key 'a' was pressed") end
Last edited by 37_Scratch (Aug. 3, 2021 16:06:25)
- Ancoder
-
1000+ posts
Imagine2D
keybinds are completed https://scratch.mit.edu/projects/557673627/
- Ancoder
-
1000+ posts
Imagine2D
its more like luaSomething inside me tells that we are making the D programming language… adding keybindskeyevent.bind("a")
print("Key 'a' was pressed")
endkeyevent.bind("a") print("Key 'a' was pressed") end
- Ancoder
-
1000+ posts
Imagine2D
here is an example of keybinding
keybind has two params key and cooldown
loop is to listen for a key press if you want to end a script after key press do this:
keybind has two params key and cooldown
keyevent.bind("a", "1")
print("Key A was pressed")
goto("100", "100")
end
loop()
keyevent.bind("a", "1")
return()
end
loop()
- SunshineSparkles647
-
500+ posts
Imagine2D
D programming languague-Something inside me tells that we are making the D programming language… adding keybindskeyevent.bind("a")
print("Key 'a' was pressed")
endkeyevent.bind("a") print("Key 'a' was pressed") end
XD
- Ancoder
-
1000+ posts
Imagine2D
here is how to make a function
calling a function:
function("goto00")
goto("0", "0")
end
calling a function:
"goto00"()
- Ancoder
-
1000+ posts
Imagine2D
default “draw a square” program:
goto("0", "0")
pen.setcolor("#00FF00")
pen.setsize("10")
eraseall()
print("Press 'n' to draw a square!")
function("drawsquare")
pendown()
goto("100", "0")
goto("100", "100")
goto("0", "100")
goto("0", "0")
penup()
resetruntime()
return()
end
keyevent.bind("n", "1")
"drawsquare"()
end
loop()
- 37_Scratch
-
1000+ posts
Imagine2D
its more like luaSomething inside me tells that we are making the D programming language… adding keybindskeyevent.bind("a")
print("Key 'a' was pressed")
endkeyevent.bind("a") print("Key 'a' was pressed") end
keyevent.bind("a") print("Key 'a' was pressed") end
Last edited by 37_Scratch (Aug. 3, 2021 18:42:40)
- InternetLizard
-
500+ posts
Imagine2D
we are having once again the EXACT SAME PROBLEM OF TOO MANY PEOPLE DOING THE SAME THING.
- WatchAndGame
-
500+ posts
Imagine2D
its more like luaSomething inside me tells that we are making the D programming language… adding keybindskeyevent.bind("a")
print("Key 'a' was pressed")
endkeyevent.bind("a") print("Key 'a' was pressed") endoh you’re rightkeyevent.bind("a") print("Key 'a' was pressed") end
that actually looks like python + C#
- SuperStickFigures
-
500+ posts
Imagine2D
What did I miss?
new page pog
new page pog
Last edited by SuperStickFigures (Aug. 3, 2021 19:57:22)
- bloctans_4
-
1000+ posts
Imagine2D
good i added vars:"pencolor" = "#00FF00"
pen.setcolor(<pencolor>)
- Marc92020
-
1000+ posts
Imagine2D
is this lua or js i added vars:"pencolor" = "#00FF00"
pen.setcolor(<pencolor>)