Use a value created in one scene in another scene

Hello

I have been trying to generate a number in one scene and then be able to use it it another scene. It is not appearing in the second scene.

If anyone can help I would be hugely grateful.

values.zip (78.3 KB)

Based on your provided document…

As far as I could tell your function “carryValueThrough” in the first scene was attempting to fill the “calcBox2” text box in the next scene. This is not something that will work using standard practices.

Note: It would be good to provide the actual Hype document instead of the exported HTML version. One less step needed for Forum members to work with your question. i.e. the need to invoke the “Restore Document from Export” in order to see your actual Hype project.


Demo Hype Doc: values_JHSv1.hype.zip (22.5 KB)

Instead we will create a variable (‘calcBox2Holder’) in the first Scene to then use in the second Scene.

"Scene 1" Action: “Scene Unload” Run the “carryValueThrough” function

Scene 1

carryValue


Then for “Scene 2” run the “Scene Load” ~ “loadCalcBox2” function:

Scene 2

loadCalcBox2

2 Likes

Thank you so much for this, you are very kind Sir. :slightly_smiling_face:

1 Like