Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 3:46 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: How to Reset a Variable
PostPosted: November 25th, 2007, 11:39 pm 
Offline

Joined: February 12th, 2005, 5:27 pm
Posts: 177
Location: Canada
Opus: Pro
OS: Win7
I have a game with multiple levels and when a user doesn't get enough points it takes him back to the last page . Now if he had 7 out of 8 when it finished , then when he restarts the page it still says 7 /8....


I have tried to use these solutions...

On show - reset score_correct to 0 ( doesn work )

On Show reset-Publication

now i have tried many but i can seem to clear the score left in the score_correct variable..

any idea's

Al

_________________
-------------------------------------------------------
Win7 AMD +5000 Dual Core with 4 gig ram Geforce 9600 OPUS V7.05 Novice to Scripts/willing to learn , Mp3 Files must be 128kb


Top
 Profile Visit website  
 
 Post subject:
PostPosted: November 26th, 2007, 12:12 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Al,

i normally use custom variables and do resetting via a script but you might try either using the reset score action under 'scoring & reporting' actions or 'reset all variables' under programming tab / variables.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Variables
PostPosted: November 26th, 2007, 2:14 pm 
Offline

Joined: February 12th, 2005, 5:27 pm
Posts: 177
Location: Canada
Opus: Pro
OS: Win7
mackavi wrote:
Al,

i normally use custom variables and do resetting via a script but you might try either using the reset score action under 'scoring & reporting' actions or 'reset all variables' under programming tab / variables.

Mack


Hi Mack,

I tried using the Script suggestion in the script side bar but it did not work . I thought there would be a script like this resetVariable ( correct_score) where you could name the Variable you wanted to reset but i didn't see such a script . The thing is that i use others variables and cant use RESET ALL , but i will research the scroe suggestion under scoring and reporting...

Thanks

Al

_________________
-------------------------------------------------------
Win7 AMD +5000 Dual Core with 4 gig ram Geforce 9600 OPUS V7.05 Novice to Scripts/willing to learn , Mp3 Files must be 128kb


Top
 Profile Visit website  
 
 Post subject:
PostPosted: November 26th, 2007, 3:23 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
to reset an individual variable try using the undfeined data type

myVariable = undefined

Mack


You do not have the required permissions to view the files attached to this post.

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: November 26th, 2007, 3:24 pm 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
I think the fact that you are having problems with this, suggests you should be using custom variables..as Mack suggeted, since you can't seem to do it using the built in scoring and reporting.
Since you don't want to reset all variables. lets assume you create a variable 'MyP2Score' which saves the score for page2. You could also have another variable to store the cumulative score for all pages 'MyTotalScore'
So ...if they successfully do whatever on the current page, to go on to the next, Then you would at that point add the page score to the total score

MyTotalScore=MyTotalScore+ MyP2Score.

Otherwise, you would send them back to the start of page 2 are reset the page 2 score

MyP2Score=0

I never try to reset or change system variables in script.

Sandy

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 51 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group