Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Varibles manipulation [score+1]

Varibles manipulation [score+1] 4 weeks 2 days ago #6973

  • Alexw555
  • Alexw555's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
Hi, I'm trying to mock up a client interview tool in which custom metrics can be used to measure student progress.

As an example, during the quiz they could be asked how they would answer a question and based off their answers a number of barameter variable scores could change. E.g understanding, trust...

As this is currently not possible, it would be nice to change the values of variables live within the flow of the system [understanding + 1] , [trust -1]

This would be especially useful to have during the feedback of quiz answers as the students could see their scores changing based off each answer

cheers,

Please Log in or Create an account to join the conversation.

Varibles manipulation [score+1] 4 weeks 12 hours ago #6977

  • purpleriver
  • purpleriver's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 1
  • Thank you received: 0
I'm having a similar issue.

The quiz I'm building should update a range of invisible params based on the answer that the user gives.I'm not sure if I'm missing something but I can't see a way to do this.

Its quite a common feature in other interactive tools, which are an option but xerte is so well positioned with its integration with the OLE.

An example of what I'm trying to achieve is the user is an adventurer, and meets a wolf. They have the choice to fight the wolf, try and run away or try and befriend it.
Fighting it would reduce health by 2, stamina by 2, increase experience by 2, and loot by 1.
Running away would decrease stamina to 0, and increase experience by 1.
Befriending it would increase experience by 3.

The updating of these variables should happen in the background only updating the user when I want to.

Is this possible in the current system or is it a new feature that would need to be built?

Note: I'm not actually building an adventure game!

Thanks!
PR

Please Log in or Create an account to join the conversation.

Varibles manipulation [score+1] 3 weeks 12 hours ago #6988

  • Fay
  • Fay's Avatar
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Posts: 177
  • Thank you received: 60
There is an optional property 'Variables' which you can add to your project which lets you create a number of variables based on parameters you set up. This guide explains how you can then use & manipulate these within your project https://xot.xerte.org.uk/USER-FILES/156-fay-Nottingham/media/Variables_Documentation.pdf

There's currently no in-built way to change the value of variables as a result of answers students give to questions (e.g. health+1 etc) but if you are able to code then you could reasonably easily do this within a project yourself. The variable data is held in an array called x_variables and each variable has a value you could manually change when a particular answer is given. I like the idea of an easier way to manipulate variables according to what answers students give though so I'll have a look into whether anything like this can be done in a future release.

Please Log in or Create an account to join the conversation.

Varibles manipulation [score+1] 1 week 12 hours ago #7051

  • Alexw555
  • Alexw555's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
Hi Fay,

Thank you so much for your reply.

So what would the code look like in order to increment a variable called counter by one?

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Moderators: jjs
Time to create page: 0.042 seconds
Copyright © 2020 The Xerte Project.
Xerte logo Apereo logo OSI Logo

Search