Ending a count and displaying the score


I am trying to create a scene where two dinosaurs fight, and depending on the random number generated, adding one to the score. Once it happens once, I want the dinosaurs to restart the scene with the variable showing the current score. When the score reaches 10, I want to it to stop and display the score depending on which dinosaur won. I have redone this many times and cannot seem to figure it out.

At the moment the scene ends but the winner just keeps dancing, and I don’t know how to reset it.

This is what I have so far CoSpaces Edu :: Dino Fight
I am not sure if this is possible in this environment.

Thanks for your help :slight_smile:

Hi @Mel_Zul,

You can use CoSpace Properties (when Advanced CoBlocks are enabled) to pass values between scenes and scripts, including when restarting a scene (I had to check this!).

See the following for a remixable demo:

Hope this helps! Let me know if you have any further questions.

Geoff @ TechLeap

1 Like