applern's Recent Forum Activity

  • I tried this with a global variable because, I only want it to show in another layout called end, where it will say Your Score is: x . It didnot work.

  • Do you want to want to score a point for each answer per question that is correct i.e. both a selected correct answer and an unselected incorrect answer score a point, or just one point per question if the answers are 100% correctly selected?

    Would the score for the current question only be shown after "submit" had been pressed?

    Do you intend to keep a running total score?

    1. Just one point per question if the answers are 100% correctly selected, please.

    2. After submit is pressed, please.

    3.What do you mean by that?

    I hope this is not to much work...

  • > but it didnt work any help? Ribis? mekonbekon dop2000 blackhornet Ashley AllanR

    Please stop tagging me.

    Sorry, I just thought you'd be able to help, and I know you odnt really like me, so you wouldnt read this post. Sorry :(

  • > So in this project which would be the current loop that we are seeing the loop index for?

    loopindex always refers to the currently running loop. For example, in this "for" loop:

    For "i" from 0 to 3, append text loopindex to TextObject.

    the text displayed by TextObject would be "0123"; each time the loop runs it takes the current loopindex value (which steps up by 1 with each loop from 0 to 3) and adds it to the text string.

    The index tag allows you to differentiate between loopindices in nested loops e.g.

    For "i" from 1 to 2 --For "j" from 1 to 3, append loopindex("i") * loopindex("j") to TextObject

    ...would display "123246" - during this nested loop each step of "i" runs a complete loop from 1 to 3 of "j".

    > Also what does + Answers: no = LoopIndex("DrawAnswers") mean?

    > I know we drew the answers from the array, but now what is that code used for. What are the instance variables correct and no used for?

    txt_answers.no is an instance variable that distinguishes between the different instances of txt_answers - if you check the txt_answers objects in the layout you will see the value of "no" increases by one for each object as you go down the layout.

    txt_answers.correct is an instance variable that equals 1 if the answer it is displaying has been marked in the questions array as a correct answer (check the "Depth = 1" sheet in the array editor for a_questions: correct answers are marked with a 1, incorrect with a 0).

    Event 6 runs a loop through each of the answers in a_questions for the current question; if the current answer slot in the array isn't blank it picks the txt_answer object with a "no" value that corresponds to the current answer (loopindex "i"), then sets the text of that txt_answer object to the answer (using the shuffled permutation table, if the action specifies it).

    In Event 7 (function checkQuestion) each txt_answer is checked to see if it has been selected by the user (txt_answer.selected is true) and if it is a correct answer (txt_answer.correct is 1); if both are true or both are false spr_tickCross displays a tick, otherwise a cross is shown.

    Thanks! How can I do it so that when you press the corre ct answer it adds one to the Corret variable.(new one tat i made) and when its wrong subtract 1

    + Answers: correct = 0
    ----+ Answers: Is selected
    ----+ System: Trigger once
    -----> System: Add 1 to Correct
    
    ----+ Answers: [X] Is selected
    ----+ System: Trigger once
    -----> System: Subtract 1 from Correct
    
    

    but it didnt work any help? Ribis? mekonbekon dop2000 blackhornet Ashley AllanR

  • I hav no idea why this is not working.

    I have a touch plugin. And a pause button.

    Basically when you touch the pause button it should pause the timer and change it's animation. When you press it agaain the timer should resume and go back to its normal animation. IDK why but when i press the pause button it's like i didnt ress it. But when I press on some specific location it works.

    My code is the following

    + Touch: On tap gesture on PausePlay
    + PausePlay: Is animation "Pause" playing
    -> TimeSprite: Set Timer timer "Q" Paused
    -> PausePlay: Set animation to "Play" (play from beginning)
    

    and

    + Touch: On tap gesture on PausePlay
    + PausePlay: Is animation "Play" playing
    -> TimeSprite: Set Timer timer "Q" Resumed
    -> PausePlay: Set animation to "Pause" (play from beginning)
    

    Please help!

    Tagged:

  • > > You can use this formula for your time format:

    > > TimeFormat = floor(Timer/60 % 60) & ":" & floor(Timer % 60)

    >

    > So this is what

    > I've done.

    >

    > On function setQuestion

    > Start Timer(behaviour) "Q" for 0.0

    > Set Text to: floor(Timer/60 % 60) & ":" & floor(Timer % 60)&(Timer.Timer.CurrentTime("Q"))

    >

    > On function checkQuestion

    > Stop Timer.

    > When the layout starts the setQuestion function begins, and when you press submit the checkquestion function begins. But right now My text "timer" get stuck at 0:00

    Okay I tried fizxing and didnt work. I'm using timer behaviour but it doesnt go to mminutes. Anyway to do this blackhornet?

    Nevermind. It did. Thank you so much for your help!. Have a wonderful day!

  • http://www.blackhornettechnologies.com/Construct3Stuff/Samples/TimerDisplay_applern.zip

    Thanks!. I tried doing

    On touch pausebutton pause timer.

    and on function checkQuestion Stop Timer.

    It didn't pause or stop and the text went back to seconds (i.e 5, 10, 20) and didn't pause or stop.

  • > You can use this formula for your time format:

    > TimeFormat = floor(Timer/60 % 60) & ":" & floor(Timer % 60)

    So this is what

    I've done.

    On function setQuestion

    Start Timer(behaviour) "Q" for 0.0

    Set Text to: floor(Timer/60 % 60) & ":" & floor(Timer % 60)&(Timer.Timer.CurrentTime("Q"))

    On function checkQuestion

    Stop Timer.

    When the layout starts the setQuestion function begins, and when you press submit the checkquestion function begins. But right now My text "timer" get stuck at 0:00

    Okay I tried fizxing and didnt work. I'm using timer behaviour but it doesnt go to mminutes. Anyway to do this blackhornet?

  • You can use this formula for your time format:

    TimeFormat = floor(Timer/60 % 60) & ":" & floor(Timer % 60)

    So this is what

    I've done.

    On function setQuestion

    Start Timer(behaviour) "Q" for 0.0

    Set Text to: floor(Timer/60 % 60) & ":" & floor(Timer % 60)&(Timer.Timer.CurrentTime("Q"))

    On function checkQuestion

    Stop Timer.

    When the layout starts the setQuestion function begins, and when you press submit the checkquestion function begins. But right now My text "timer" get stuck at 0:00

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yes, it is correct.

    Thank you. Do you know how to start the timer cause thi is just the format.

  • You can use this formula for your time format:

    TimeFormat = floor(Timer/60 % 60) & ":" & floor(Timer % 60)

    So would I put tthis in the text? like

    On Function Set Question

    Set Timer text to:floor(Timer/60 % 60) & ":" & floor(Timer % 60)

    ?

  • I'm using timer behavior but it doesn't go to minutes. Anyway to do this? It stays in second and goes on to 61, 62 etc. I have a text ccalled timer and trying to use it

applern's avatar

applern

Member since 7 Oct, 2019

None one is following applern yet!

Trophy Case

  • 5-Year Club
  • Email Verified

Progress

6/44
How to earn trophies