Hi InsaneProject!
If I understand correctly, you want to count how many items were found at the end of a level. Right?
what you need is a counter. Here is how it's done. You'll need the full or the commercial version.
- Create an integer variable. You can call it "counter"
- Under each hotspot where an item (trophy) is found, increment your counter with the following code in the Advanced Tab:
- Code: Select all
counter = counter + 1
On the frame you want to display the results, you might use the textbox feature that you create by right-clicking on the frame background. Enter some text like: Number of Trophies Found: 00
After you create a textbox, hover over the textbox and it will display the textbox index number. Remember this number for the next step.
From the Frames Properties - Advanced Tab, enter the following code to display the results to the textbox
- Code: Select all
Text(1) = "Number of Trophies Found: " & counter
Be sure to reset the counter when the player goes to another frame or when they click on a hotspot with the following code:
- Code: Select all
counter = 0