Forum Discussion

DaraBracamonte's avatar
DaraBracamonte
Community Member
2 years ago

How do I total up points between multiple counters?

I set up a game where the user will select 20 poker chips. Each poker chip color has a different point value, but the user doesn't know how many points each color chip has. In the next slide, I show how much each chip is worth (reference variables CounterBlack, CounterRed, CounterGreen, CounterBlue). I have a counter that shows how many of each color were selected, and I am referencing the counters for each color below the colored chip so we know how many of each color chip was selected.

 

So I can see how many "points" were received for each color chip, however, I'd like to add up the values from CounterBlack, CounterRed, CounterGreen, CounterBlue, how do I do that? I see there's a trigger you can add to add one counter to another, but not more than that. 

  • Create a CounterTotal variable. Set CounterTotal to 0 when timeline starts (very important!). Add CounterBlack to CounterTotal. Add CounterRed to CounterTotal, etc. You need four triggers, one for each color.

  • I have another question regarding this same interaction. I would love to be able to tie the results to an actual results slide and once they exit the course, the Total Points (CounterTotal) would be submitted to the LMS as the final score. Is this something you would be able to help with?

  • The only thing I can't find is what a valid URN is. In that article it says: 

    "Then, position your cursor between the empty quotation marks on line 15 and enter a valid URN to identify the activity."

    I'm not sure what a URN is or what I would enter for that in the code text. 

  • Hi Dara,

    I'm happy to jump in here!

    You can check out this article which shows an example of what a valid URN looks like when creating xAPI statements.

    xAPI statement editor window.

    If you need additional help with your file, please let us know! You can also reach out privately in a support case. We'll delete it from our systems once troubleshooting is complete.

  • Thanks Kelly, I did find that article, I'm just not sure what I would use for my activity as a URN. I did go ahead and open a Support Case to determine how I can accomplish this goal either using the built-in functionality or the API statement. 

    • StevenBenassi's avatar
      StevenBenassi
      Staff

      Hi Dara!

      Great call on opening a support case! I see that you've connected with my colleague Carlo. You're in great hands working with him! It looks like Carlo replied to your e-mail with some feedback and steps to take.

      We can continue this conversation over in your support case to keep all information in one spot!

  • I'm in the process of finding out what a URN is, and I keep arriving at discussions where the link, offered above, is presented as a source. There's nothing on that page about a URN. Do I really need to open a support case for a definition of this? Apologies for the frustration, but the offered non-solution being repeated is frustrating. 

    • LaurenConnelly's avatar
      LaurenConnelly
      Staff

      Hello Luis!

      Sorry for the frustration this is causing. We are happy to help you in this discussion!

      A URN is used as an identifier. Are you creating an xAPI statement in your course? If you could help us understand where you need a URN, we can definitely help.