theRAPTLab / gsgo

GEM-STEP Foundation repo migrated from GitLab June 2023
1 stars 1 forks source link

RoundStop event does not fire #258

Open benloh opened 3 years ago

benloh commented 3 years ago

In GitLab by @coreybrady on Jul 28, 2021, 08:41

Put this in a blueprint

PROGRAM EVENT

onEvent Start [[ dbgOut '!!!!!Round Start' ]] onEvent RoundStop [[ dbgOut '!!!!!Round Stop' ]]

Note that the start message does fire; the stop does not.

Do not be fooled by the "Round Stop!" message sent by sim-rounds.js

benloh commented 3 years ago

Ah this is because as the round stops, scripts stop running.

Two possible workarounds:

  1. Put the script in the Round endScript and it'll run, but it'll run in the context of the Global Agent.
  2. We'd need to add another special handler/phase to run scripts after the sim has stopped.

2 is much harder. 1 already works.

@coreybrady @jdanish Please let me know if this is high priority. It might also help if you tell me what you're trying to do and I can help you brainstorm other ways of doing it.

benloh commented 3 years ago

In GitLab by @coreybrady on Jul 28, 2021, 10:11

Not necessarily high priority – it was about 3 steps deep into a workaround for the limitations of round code that I had been running into. For my own particular problem, I found a different route to work around limitations -CB

Corey Brady Assistant Professor, Learning Sciences Director, LIVE Initiative (interim) Dept of Teaching and Learning, Peabody College (primary) Depts of Mathematics and of Computer Science (secondary) Vanderbilt University corey.brady@vanderbilt.edu

benloh commented 3 years ago

One more nuance for the record: onEvent RoundStop [[ ... ]] WILL run, it just runs when the next round starts because the event is queued.