-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code runs on the selected sprite, instead of the sprite where the script is located #2885
Comments
I was able to reproduce the error I noticed before: If I open the Air Quality example, open the Stage sprite and hit the green flag, I get this: Here's the trace:
|
Closing this as the problematic code is in the client repo. Updates can be found here: NetsBlox/Snap--Build-Your-Own-Blocks#1105. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue: When running code in Netsblox, the sprite currently selected in the corral will do all actions (e.g. move, say, etc.), rather than the sprite where the script is, which should be doing these actions.
For example, if I have two sprites:
Sprite 1 (gray) with the following code:
and Sprite 2 (orange) with no code...
If I have Sprite 2 selected, and click the green flag, I see this:
Sprite 2 has said hello, instead of Sprite 1, where the script is.
I've uploaded the test code here (change to .xml):
test.xml.txt
When I first encountered this error, it was with some older code I had loaded, and I got a javascript error (I can't reproduce it). The error was something like:
cannot find target for script
. Which make sense, since the issue is that the wrong script target is being used.The text was updated successfully, but these errors were encountered: