Jakkah
February 25, 2021, 7:59pm
1
Problem:
Hello folks, thanks for your time!
I’m struggling to make an hidden button or whatever to assign 1 point at certain time of timeline. Need that for a video presentation, when users watch 80% of the total video lenght will be assign to that user 1 point, without any action from user.
I’m tring to make an hidden button, that button trigger an action for modify a variable but can’t find total score on the variables list. Any suggestion?
Thanks.
ActivePresenter version:
Versione 8.3.2 - 64-bit build.
OS:
Win 10
Notes:
Jakkah
February 25, 2021, 11:54pm
2
Solved reading other questions like mine. Thank you in any cases!
Basically, I created 2 hidden buttons that set prez.score variable.
80% timeline hidden button that trigger when his time ending:
var fScore = prez.score;
prez.score = function() {
return fScore.call(this) + 80;
}
prez.maxScore = function() {
return 100;
}
100% timeline hidden button that trigger when his time ending:
var fScore = prez.score;
prez.score = function() {
return fScore.call(this) + 20;
}
prez.maxScore = function() {
return 100;
}
I cannot uplod file cause I’m new user… anyways it works like a charm!
I upgraded code with some tricks, for example: if user views only 80% gets 80 points, if 100% gets 100 points.
I have another questions:
prez.maxScore can be setted only one time (project>propriety>event) or is better every time that its retrives?
ToanLS
(Toan Le)
February 26, 2021, 1:45am
3
Hi Jakkah,
You should define your custom prez.score
and prez.maxScore
only once (in Project > Properties > Event ) as in my answer in this thread:
Hi,
You can add the following script to Project > Properties > Event to use your score and success as the system score and success:
if (!prez.myCustomScore) {
prez.myCustomScore = true;
prez.score = function() {
// update your_score_variable_name
return this.variable('your_score_variable_name');
};
prez.maxScore = function() {
// update maximum score for your project
return 100;
};
prez.result = function() {
// return true -> suc…
(You don’t need a custom result so please remove prez.result
in the script from the thread above)
After that, you set the variable your_score_variable_name
to 80, and 100 for each button, respectively.
Regards
Jakkah
March 18, 2021, 2:27pm
4
Hello ToanLS,
your code works better and more clean then my solution.
Thank you!
Best regards.