Any views expressed within media held on this service are those of the contributors, should not be taken as approved or endorsed by the University, and do not necessarily reflect the views of the University in respect of any particular issue.

Use result script to get different endings

As we envisioned it, we would not tell the player during the playing whether their selection of objects was correct or not, but rather when the player enters the ending room, the corresponding ending sound design would be played according to the number of correct objects selected by the player. With a lot of study and help from our tutor and friends, this is how we implemented this logic:

  1. mark all selectable objects into correct and incorrect.

With this script, we only need to tick off the correct objects.

 

 

  1. Calculate the score after the player completes the selection. For each correct object selected, the recorded data is increased by 1. This step is refined directly in the selection script.

 

3. Based on the player’s total score, five carrier objects that play the ending sound design are set up, corresponding to scores 0 ~ 5. In this result script, only the object corresponding to that score will be visible, the other four will be hidden. Drag the corresponding object into the box can simply complete the setting.

 

So when the player finally enters the ending room, they will only see the corresponding sphere and hear one of the sound designs.

 

Leave a Reply

css.php

Report this page

To report inappropriate content on this page, please use the form below. Upon receiving your report, we will be in touch as per the Take Down Policy of the service.

Please note that personal data collected through this form is used and stored for the purposes of processing this report and communication with you.

If you are unable to report a concern about content via this form please contact the Service Owner.

Please enter an email address you wish to be contacted on. Please describe the unacceptable content in sufficient detail to allow us to locate it, and why you consider it to be unacceptable.
By submitting this report, you accept that it is accurate and that fraudulent or nuisance complaints may result in action by the University.

  Cancel