Forum Discussion

StefanHoll's avatar
StefanHoll
Community Member
2 years ago

Java script code to reset /play again a scene

Hello dear community,

I am explicitly looking for a java script code to replay a scene.

I have a project with four scenes.
I want the users to be able to replay the last scene when they press an inserted button.


I thank you in advance

  • Stefan,

    I am curious why you would do this with JavaScript when the built-in triggers to "jump to scene" would seem to suffice. Am I missing something?

    Thanks,

    Richard

    Richard

  • StefanHoll's avatar
    StefanHoll
    Community Member

    Thank you Richard for your answer.

    I need the Java script code because....

    The last scene is an interactive game. In this scene, four slides are set to the "reset to original state" state and five slides are set to the "return to saved state" state. These settings on the slides are important for the interactive game to work.

    If users want to play the interactive game again without restarting the course, then only the scene needs to be reset.

    Therefore, I am looking for a Java script code to reset only this scene.