True Or False Game


hi

a total newbie director , need i'm stuck,

for part of college work trying doing true or false game based on 10 questions unsure how script this, game involves when question has been answered correctly user sent marker named "right", showing animation telling them have answered correctly, if have answered question incorrectly sent marker named "wrong" again showing animation telling them have answered incorrectly.

the way have decided importing questions text file hold 10 question, current script have director load questions is.....

on mouseup me
openandreadtext
end

but wanting randomize them.

i have 2 buttons named true , false, , because 5 questions true , 5 false, code have far in different scripts

on startmovie
answer
end

on answer
global gquestions
gquestions = true
end

global gquestions
on mouseup me
if gquestions = true
go "right"
else
go "wrong"
end if
end

and dont know code needs added determine correct answer goes correct marker

thanks ifor in advance

chris

consider low tech aproach.

if don't have big library of questions have imported
dynamically, suggest going less programatic intensive
approach, in each question contained in predefined text
member displayed in separate score marker.


again simplest least programatic approach have actions
the true false answer buttons assigned separately each individual
question, in question number 3 might have true button go
to wrong marker.


you avoid writing lingo code using navigate marker
behavior library palette access marker series
already have setup in score.


a hard coded series of markers might like:

question1
right1
wrong1
question2
right2
wrong2
question3
right3
wrong3


they show in parameter popup menu in behavior.


a score script @ start of right wrong markers increment
the global question tally

on exitframe
global rightcount, totalcount
totalcount = totalcount + 1
rightcount = rightcount + 1 -- line in righ marker
script
end


More discussions in Director Lingo


adobe

Comments

Popular posts from this blog

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

How to format a Get Request

avrdude: verification error, first mismatch at byte 0x0000 0x0c != 0x62