Discuss Scratch

letalk
New to Scratch
5 posts

Nur eine Taste betätigen und dann auf Ereignis warten

Hallo zusammen,
ich habe in einem Skript verschiedene Blöcke mit Wenn Taste … gedrückt. Zum Beispiel auch Pfeil links und Pfeil rechts. Zum Beispiel soll, nachdem einmal Pfeil nach links gedrückt wurde, auf ein Ereignis gewartet werden und solange keine andere Taste betätigt werden können. Ich habe schon mit sende … an alle und stoppe dieses Skript versucht aber irgendwie kann man trotzdem gleich wieder die Pfeiltaste rechts oder eine andere Taste betätigen. Kann mir da jemand Weiterhelfen ?

webdesigner97
Scratcher
100+ posts

Nur eine Taste betätigen und dann auf Ereignis warten

Es gibt einen Block

warte bis <>

Vllt hilft dir der weiter…
letalk
New to Scratch
5 posts

Nur eine Taste betätigen und dann auf Ereignis warten

Danke für den Hinweis, dadurch habe ich gemerkt, dass man ja auch unter Fühlen Taste … gedrückt findet. Dann kann ich mit falls arbeiten. Nun komme ich weiter.
letalk
New to Scratch
5 posts

Nur eine Taste betätigen und dann auf Ereignis warten

Hallo ich nochmal, also ich hatte es mir einfach gedacht aber es funktioniert einfach nicht.
Ich habe ein Objekt (einfacher Kreis) dazu das Skript: Wenn grüne Fahne angeklickt - falls Taste Pfeil nach links gedrückt ? - gehe zu x: -140 y: 10 - falls Taste Pfeil nach rechts gedrückt ?- gehe zu x: 140 y: 10
Alles passt ineinander, aber wenn ich die grüne Fahne anklicke und dann die Pfeiltaste links oder rechts betätige passiert gar nichts. Woran kann das liegen ?
Lirex
Scratcher
500+ posts

Nur eine Taste betätigen und dann auf Ereignis warten

Das was du programmiert hast führt dazu, dass, nachdem du die grüne Fahne angeklickt hast, Scratch kurz überprüft ob der Pfeil nach links gedrückt wird, und danach, ob der Pfeil nach rechts gedrückt wird. Und dann war's das auch schon wieder. Es wird also nur einmal geprüft, ob die Pfeiltasten gedrückt sind, und dann das Skript gestoppt. Um das zu verhindern, musst du eine “wiederhole fortlaufend”-Klammer um die “falls …”-Klammern setzen. Dadurch werden die Tasten kontinuierlich überprüft.
Ich hoffe das hilft.

Scratch-DACH-Wiki author


;




Yay, 500+ posts! (05/25/2014)
letalk
New to Scratch
5 posts

Nur eine Taste betätigen und dann auf Ereignis warten

Danke für den Tipp !
abdulrahman_elhelw
Scratcher
1 post

Nur eine Taste betätigen und dann auf Ereignis warten

1
mr7muff
Scratcher
100+ posts

Nur eine Taste betätigen und dann auf Ereignis warten

abdulrahman_elhelw wrote:

1
Hallo, willkommen im Forum. Bitte mache keine posts die nichts mit dem Topic zu tun haben.

highlight this and press control+shift+down to see the rest of my siggy!
Some stupid quotes:
'Everybody is standing, but you must stand out. Everybody is breaking grounds; but you must breakthrough! Everybody scratching it; but you must scratch it hard!'
-idk who
'There are two things that are infinite: the universe and human stupidity. But I am not so sure about the universe.'
-Albert Einstein
'If Russia stops fighting, there will be no war. If Ukraine stops fighting, there will be no Ukraine.'
bobcat0701
'There are two different types of people in the world: those who want to know, and those who want to believe.'
Friedrich Nietzsche
''Remember the worth of souls is great in the sight of God'
- Doctrine and Covenants 18:10
'Fiction is real life without its mask.'
-Michael Casher
'Be yourself; everyone else is already taken.'
-Oscar Wilde
'I've learned that people will forget what you said, people will forget what you did, but people will never forget how you made them feel.'
-Maya Angelou
‘Always forgive your enemies; nothing annoys them so much.’
-Oscar Wilde
'(…)The people who are crazy enough to think they can change the world, are the ones who do.'
-Rob Siltanen

Last edited by kaj (yesterday 6:42:13)






Powered by DjangoBB