| View previous topic :: View next topic |
| Author |
Message |
Termin8tR Guest
|
Posted: Thu Dec 25, 2003 10:12 am Post subject: trivia.tcl question |
|
|
hey all,
i run the trivia.tcl from souperman and made some adjustments to encrease the scores per correct answer.
Now i want to display the time after each hint given like:hint .... val points 45 seconds remaining and the points should decrease at each hint
i will set the code here that i've entered in the tcl
fore the bonusquestions is the code:
proc get_rand_value {} {
set rnd [rand 79]
set rnd [expr $rnd+30]
if {$rnd < 101} {
set val [expr [expr $rnd/10]+450]
} else {
switch $rnd {
101 {set val 1000}
102 {set val 1500}
103 {set val 2000}
104 {set val 2500}
105 {set val 3000}
106 {set val 3500}
107 {set val 4000}
108 {set val 5000}
default {set val 0}
}
}
unset rnd
return $val
For the msg after the hints i allready have this:
tggamemsg "[tgcolqhead]===== vraag [expr $tgquestionnumber+1]/$tgquestionstotal [expr $tghintnum?"(hint $tghintnum/$tgmaxhintcurrent)":""] ====="
if {$tgalwaysshowq==1||$tghintnum==0} {
tggamemsg "[tgcolqbody][expr $tgcapsquestion?"[strupr $tgcurrentquestion]":"$tgcurrentquestion"]"
}
tggamemsg "[tgcolhint]Hint: [expr $tgcapshint?"[strupr [join $_hint]]":"[join $_hint]"]\00300 \00312,00 [join $qval]\00312,00 punten"
set tghinttimer [utimer $tgtimehint tghint]
is there someone who nows how i can set the options i'v displayed at the beginning of this tread ???
Thx in advance |
|
| Back to top |
|
 |
|
|
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 vote in polls in this forum
|
|