
-----------------------------------
NO-NAME
Sun Jun 08, 2008 10:46 am

how can i get it higher automatically
-----------------------------------
the problem i have is how can i get it higher automatically?
i have program it with higher by the right answer but if theres a question that get wrong answer for the next right answer it will higher 2 spaces. for example


if all the question are the right it will works in this way . one step per question

                            |
                   _____|
                   |
            ____|     
            |
       ___|
  O   |
____|                                                        
                            |
                   _____|
                   |
            ____|     
         O |
       ___|
       |
____|                            |
                   _____|
               O  |
            ____|     
            |
       ___|
       |
____|

                                                                              





but if theres a question that wrong it will be like this
question 1 (right)
                          _______
                          |
               ______|
               |
      _____|                                
  O |                                         
___|                                    

question 2 (answer is  wrong  so its still on the first step.)
                          _______
                          |
               ______|
               |
      _____|                                
  O  |                                         
___|    

question 3 (right but it should be on the second step not the third step that i promgramm.)
                               _______
                         O    |
                     ______|
                    |
           _____|                                
          |                                         
______|    


can anyone help me this?
thx alot!

-----------------------------------
Insectoid
Sun Jun 08, 2008 10:53 am

RE:how can i get it higher automatically
-----------------------------------
Could you rephrase the question, not using the word 'higher'? Don't mean to offend, but I have no idea what you are asking.

-----------------------------------
NO-NAME
Sun Jun 08, 2008 10:54 am

RE:how can i get it higher automatically
-----------------------------------
im fixing the picture now

-----------------------------------
NO-NAME
Sun Jun 08, 2008 11:04 am

Re: how can i get it higher automatically
-----------------------------------
if all the answers are right it will be like this.one step by one question.
thats the first step
[img] http://www.popo8.com/files/albums/20086/1212940803.jpg [/img]
thats the second 
[img] http://www.popo8.com/files/albums/20086/1212940816.jpg [/img]
third
[img] http://www.popo8.com/files/albums/20086/1212940827.jpg [/img]

but if theres an wrong answer it will be 
first (right)
[img] http://www.popo8.com/files/albums/20086/1212940803.jpg [/img]
second (wrong . should be stand still)
[img] http://www.popo8.com/files/albums/20086/1212940803.jpg[/img]
third (right but it will jump to the third one not the second one)

[img] http://www.popo8.com/files/albums/20086/1212940827.jpg [/img]

do u see what i mean?

-----------------------------------
Tony
Sun Jun 08, 2008 12:45 pm

RE:how can i get it higher automatically
-----------------------------------
I think you just need to draw the image mapped to the sum of the correct answers so far.

Pic.Draw("img_" + intstr(num_correct) + ".jpg")

Or something similar.

Obviously you should not increment the num_correct if the answer is wrong.

-----------------------------------
NO-NAME
Sun Jun 08, 2008 12:58 pm

Re: RE:how can i get it higher automatically
-----------------------------------
I think you just need to draw the image mapped to the sum of the correct answers so far.

Pic.Draw("img_" + intstr(num_correct) + ".jpg")

Or something similar.

Obviously you should not increment the num_correct if the answer is wrong.
i just programm them in the simple way so it can moves to the next step
but i didnt think about if there has any wrong     - -|||


can u tell me more details? im a beginner.
 
setscreen ("graphics")
var picid1 : int := Pic.FileNew ("1.jpg")
picid1 := Pic.FileNew ("1.jpg")

process ladder

    var picid : int := Pic.FileNew ("ladder.jpg")
    picid := Pic.FileNew ("ladder.jpg")
    Pic.Draw (picid, 310, 0, picMerge)
    drawfillbox (600, 290, 605, 318, gray)
    drawfillbox (605, 310, 625, 318, red)
    Pic.Draw (picid1, 290, 0, picMerge)
end ladder


process question

    var Q1, Q1A1, Q1A2, Q1A3 : int
    Q1 := Font.New ("serif:12")
    assert Q1 > 0
    Q1A1 := Font.New ("serif:12")
    assert Q1A1 > 0
    Q1A2 := Font.New ("serif:12")
    assert Q1A2 > 0
    Q1A3 := Font.New ("serif:12")
    assert Q1A3 > 0
    Font.Draw ("1)HTML is short for ____.", 0, 340, Q1, red)
    Font.Draw ("a) HappyText Markup Language.", 0, 320, Q1A1, green)
    Font.Draw ("b) HyperText Makeup Language.", 0, 300, Q1A2, green)
    Font.Draw ("c) HyperText Markup Language.", 0, 280, Q1A3, green)
    Font.Free (Q1)
    Font.Free (Q1A1)
    Font.Free (Q1A2)
    Font.Free (Q1A3)


    var answer : string

    const height1 :=290
    get answer
    if answer = "c" then
    
        drawfillbox (290, 0, 360, 60, 0)
        Pic.Draw (picid1, 350, 40, picMerge)
    elsif answer = "C" then
        drawfillbox (290, 0, 360, 60, 0)
        Pic.Draw (picid1, 350, 40, picMerge)
    else
        Pic.Draw (picid1, 290, 0, picMerge)
    end if


    drawfillbox (0, 250, 250, 360, 0)
    var Q2, Q2A1, Q2A2, Q2A3 : int
    Q2 := Font.New ("serif:12")
    assert Q2 > 0
    Q2A1 := Font.New ("serif:12")
    assert Q2A1 > 0
    Q2A2 := Font.New ("serif:12")
    assert Q2A2 > 0
    Q2A3 := Font.New ("serif:12")
    assert Q2A3 > 0
    Font.Draw ("2)'URL' is stand for __.", 0, 340, Q2, red)
    Font.Draw ("a) Uniform Resource Locator.", 0, 320, Q2A1, green)
    Font.Draw ("b) Unit Resource Locator.", 0, 300, Q2A2, green)
    Font.Draw ("c) Uniform Resources Locator.", 0, 280, Q2A3, green)
    Font.Free (Q2)
    Font.Free (Q2A1)
    Font.Free (Q2A2)
    Font.Free (Q2A3)


    get answer
    if answer = "a" then
       drawfillbox (350, 40, 420, 120, 0)
        Pic.Draw (picid1, 410, 80, picMerge)


    elsif answer = "A" then
drawfillbox (350, 40, 420, 120, 0)
        Pic.Draw (picid1, 410, 80, picMerge)

    else
Pic.Draw (picid1, 350, 40, picMerge)
    end if


    drawfillbox (0, 250, 250, 360, 0)
    var Q3, Q3A1, Q3A2, Q3A3 : int
    Q3 := Font.New ("serif:12")
    assert Q3 > 0
    Q3A1 := Font.New ("serif:12")
    assert Q3A1 > 0
    Q3A2 := Font.New ("serif:12")
    assert Q3A2 > 0
    Q3A3 := Font.New ("serif:12")
    assert Q3A3 > 0
    Font.Draw ("3) What's 'www' stand for ?", 0, 340, Q3, red)
    Font.Draw ("a) Wire Wide Web.", 0, 320, Q3A1, green)
    Font.Draw ("b) Work Wide Web.", 0, 300, Q3A2, green)
    Font.Draw ("c) World Wide Web.", 0, 280, Q3A3, green)
    Font.Free (Q3)
    Font.Free (Q3A1)
    Font.Free (Q3A2)
    Font.Free (Q3A3)



    get answer
    if answer = "c" then
       drawfillbox (350, 60, 420, 120, 0)
        Pic.Draw (picid1, 440, 130, picMerge)


    elsif answer = "C" then
       drawfillbox (350, 60, 420, 120, 0)
        Pic.Draw (picid1, 460, 120, picMerge)

    else

    end if
end question

fork ladder
fork question
