Skip to main content
darens41964140
Participating Frequently
April 20, 2019
Answered

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

  • April 20, 2019
  • 1 reply
  • 673 views

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.

Any thoughts on what I'm doing wrong?

This topic has been closed for replies.
Correct answer kglad

to restate, don't do this:

var whatever = ...

in one frame/scene/line, and

var whatever = ...

on another frame/scene/line

1 reply

kglad
Community Expert
Community Expert
April 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.

darens41964140
Participating Frequently
April 21, 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

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
April 21, 2019

to restate, don't do this:

var whatever = ...

in one frame/scene/line, and

var whatever = ...

on another frame/scene/line