Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Using "Move with Keyboard Arrows" in multiple scenes creates conflicts.

Community Beginner ,
Apr 20, 2019 Apr 20, 2019

Hi,

I want to use the "Move with Keyboard Arrows" to move a different thing in each different scene.

it works fine if I only have the code in one scene. But as soon as I add the code to another scene I get errors.

Screen Shot 2019-04-20 at 15.12.18.pngScreen Shot 2019-04-20 at 15.12.41.png

Any thoughts on what I'm doing wrong?

640
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 21, 2019 Apr 21, 2019

to restate, don't do this:

var whatever = ...

in one frame/scene/line, and

var whatever = ...

on another frame/scene/line

Translate
Community Expert ,
Apr 20, 2019 Apr 20, 2019

if the boolean upPressed has already be declared in a frame before, 3, don't re-delcare it.  eg,

upPressed=false;

likewise for your other variables.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 20, 2019 Apr 20, 2019

Thank you. I'm still working on this, haven't got it to work properly yet...

...maybe I don't fully understand your advice. I'll come back to this one in the morning, kglad​

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 21, 2019 Apr 21, 2019
LATEST

to restate, don't do this:

var whatever = ...

in one frame/scene/line, and

var whatever = ...

on another frame/scene/line

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines