Feature request - reload current scene

We live CoBlocks. At a recent class, several students wanted to be able to restart their programmed game. Naively I thought they can just load the current scene again, but we discovered you can load other scenes and not the current one.

Would it be possible to add the current scene to the ones you can load :smiley:


Hi @tproffen,

This is a good feature request! Right now you can not restart the same scene with CoBlocks, but we’ll look into providing an option for that :slight_smile:

In the meantime your students can do a workaround by creating a ‘restart’ scene which switches back to the scene where the player came from to achieve this effect.

Thanks - the work around is great :slight_smile:

My students would like to be able to restart a scene while remaining in Play mode. The objects should return to their initial state (position, direction, size, color, opacity, …) and the program starts again from the beginning (with the variables at their initial value …).
Currently the student must leave the Play mode or refresh the page, then restart the execution of the code.
The ideal would be a “Restart” or “Reset” button in CoSopaces.
What do you think ?

Here’s a way. https://cospac.es/ZVZ9
Store the initial positions of all the items in the scene.
Send the items back to their initial positions when the button is clicked.

There has to be a better way than mine because mine requires adding all the items manually.
This would better…

Get number of items in scene
Repeat for all items
Get the item name
Store the item name in a list of items
Get the item position
Store the item position in a list of positions

Alternatively, in order to perform less manual work, you can use a workaround method described in this message: Feature request - reload current scene

@Pavel I don’t understand how this workaroud could me a solution for my students.

@Daniel_Pers take a look at the example here. Is that what you are trying to achieve?

demo here

Thank you @Pavel for this quick response. I would have preferred a button out of the scene, without a specific code, but this solution is simple and effective.
I do not know how to do if I have several scenes. How to get back to the scene that requires a reset (with only one additionnal “Reset scene”)?

Yeah currently you’ll need one additional “Reset scene” for every scene that you want to be able to reset. We used this approach ourselves in CoSpaces Edu :: VR Adventure Game.

We have something in the oven to allow resetting scenes in a more convenient way, but I can not provide any specific details at the moment.

Ok thank you @Pavel . While waiting for this new feature, we will continue to exit the Play mode and restart the run.