applern's Recent Forum Activity

  • applern,

    I have No Idea. I get the same error as you when I try to do it.

    However I found that I can copy and paste it as many times as I like. Then change whatever I want within the event, even add more OR statements.

    What I do is, I open the project with the 'OR' statement in the desktop version of C3. Then I open the current project I'm working on in my web browser. (You can have more than one C3 project open at one time) Then I copy the entire 'OR' event from the project I have open on the desktop version of C3 and paste it into the project I have open in the Browser version of C3.

    I don't know why it works, but it does.

    Here's the statement for you. You can copy and paste it into any project and it works.

    https://drive.google.com/file/d/1fe6Uthj9ui9MVqSzW8QTok9ZDpRcV8ko/view?usp=sharing

    It must be a glitch. A very useful glitch though :P Edit: Nevermind. It isn't a glitch. ( I don't think so)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > The Loopindex is the current iteration of the referenced loop.

    >

    >

    > From the manual:

    >

    > LoopIndex

    >

    > Get the index (number of repeats so far) in any currently running loop.

    >

    > LoopIndex(name)

    >

    > Get the index (number of repeats so far) of the loop with the given name. Useful for getting indices in nested loops.

    So in this project which would be the curretn loop that we are seeingg thr loop index for? 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 fr?

    For me the tag "j" is "DrawAnswers" in ccase there was confusion

  • I think I screwed up.

    I set this up so whenever the jet-packed turtle hits an object 2 points are subtracted from the seconds. It works great!

    Then I had this great idea. When the jet-packed turtle subtracts 2 it should also switch animation to the same image, but outlined in Red! And then back to the original image. Every time the image is hit it should go to Red and switch back. I made all the images, uploaded all the images to the corresponding images, designated all the animations 'hit'.

    Now I'm stuck. I need something to set the animation, but I'm not sure how. I know creating a family won't do it.

    Hints? Thoughts?

    This is just a question from me. How did you manage to put all the triggered conditions into one event. I have tried but it said due to restrictions it didnt work

  • The Loopindex is the current iteration of the referenced loop.

    From the manual:

    LoopIndex

    Get the index (number of repeats so far) in any currently running loop.

    LoopIndex(name)

    Get the index (number of repeats so far) of the loop with the given name. Useful for getting indices in nested loops.

    So in this project which would be the curretn loop that we are seeingg thr loop index for? 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 fr?

  • applern

    mid((Browser.ExecJS("Date()")),3,13)

    Okay, thanks!

  • > What does

    >

    > > + a_questions: Value at (LoopIndex("j"), currentQuestion, 0) ≠ ""
    > 

    mean? (Event 6 condition 2)

    This checks tif the answer in the a_questions array at the current loopindex is not an empty cell (text does not equal "").

    So what is loopindex?

  • You odnt have to make a new project. I know it a lot of work .

    What does

    + a_questions: Value at (LoopIndex("j"), currentQuestion, 0) ≠ ""
    

    mean? (Event 6 condition 2)

  • > 1. Is 'totalquestions' a function? (event 1)

    No, it's a global variable that takes it value from the height of the a_questions array (i.e. the number of questions)

    > 2.What is BBoxRight (event 1)

    BBoxRight is the X coordinate of the right-hand edge of the spr_tickCross box.

    > 3.What is "i" (event 3)

    "i" is just a tag for the loopindex - in this instance it's not really needed, but when you use nested loops you give them different tags to be able to reference specific loop indices.

    > 4.What does permutation mean for advanced random?

    A permutation is an arrangement of values; the AdvancedRandom plugin can generate a random permutation of values without repetition - in this instance we randomise the order of questions and stick the values into a_questionOrder.

    > 5.What does 'Self.selected=0?rgbEx(0, 0, 0):rgbEx(0, 0, 255)' mean? (event 16)

    This expression uses the conditional operator to set the colour of the text. The conditional operator works as follows: Is this statement true ? If so do this : otherwise do this

    >

    > I'm sorry for all the questions :( But thnaks for all your help :)

    No problem :-)

    Thanks! This was really helpful ! :DDDD

  • Sorry, my bad - you also need to change the references to a_questionOrder:

    In event 4 change:

    -> txt_question: Set text to a_questions.At(0,a_questionOrder.At(currentQuestion),0)

    to

    -> txt_question: Set text to a_questions.At(0,currentQuestion,0)

    In event 5 change:

    -> txt_answer: Set text to a_questions.At(AdvancedRandom.Permutation(LoopIndex("j")),a_questionOrder.At(currentQuestion),0)

    to

    -> txt_answer: Set text to a_questions.At(AdvancedRandom.Permutation(LoopIndex("j")),currentQuestion,0)

    // Set the "correct" instance value on the answer.

    and

    -> txt_answer: Set correct to a_questions.At(AdvancedRandom.Permutation(LoopIndex("j")),a_questionOrder.At(currentQuestion),1)

    to

    -> txt_answer: Set correct to a_questions.At(AdvancedRandom.Permutation(LoopIndex("j")),currentQuestion,1)

    I've updated the demo to reflect these changes - the original actions are still there but disabled, in case you want to switch back. I also fixed a couple of other bugs, so it's worth grabbing again:

    https://www.dropbox.com/s/qc9dourwsf4f7g6/quizTemplate2.c3p?dl=0

    So Let say some questions of 4 answer choices, and some have 5 and some have 6. Should they be in seperate arrays?

  • Sorry, my bad - you also need to change the references to a_questionOrder:

    In event 4 change:

    -> txt_question: Set text to a_questions.At(0,a_questionOrder.At(currentQuestion),0)

    to

    -> txt_question: Set text to a_questions.At(0,currentQuestion,0)

    In event 5 change:

    -> txt_answer: Set text to a_questions.At(AdvancedRandom.Permutation(LoopIndex("j")),a_questionOrder.At(currentQuestion),0)

    to

    -> txt_answer: Set text to a_questions.At(AdvancedRandom.Permutation(LoopIndex("j")),currentQuestion,0)

    // Set the "correct" instance value on the answer.

    and

    -> txt_answer: Set correct to a_questions.At(AdvancedRandom.Permutation(LoopIndex("j")),a_questionOrder.At(currentQuestion),1)

    to

    -> txt_answer: Set correct to a_questions.At(AdvancedRandom.Permutation(LoopIndex("j")),currentQuestion,1)

    I've updated the demo to reflect these changes - the original actions are still there but disabled, in case you want to switch back. I also fixed a couple of other bugs, so it's worth grabbing again:

    https://www.dropbox.com/s/qc9dourwsf4f7g6/quizTemplate2.c3p?dl=0

    I have a couple questions (sorry, not undderstanding)

    1. Is 'totalquestions' a function? (event 1)

    2.What is BBoxRight (event 1)

    3.What is "i" (event 3)

    4.What does permutation mean for advanced random?

    5.What does 'Self.selected=0?rgbEx(0, 0, 0):rgbEx(0, 0, 255)' mean? (event 16)

    I'm sorry for all the questions :( But thnaks for all your help :)

  • You're welcome :-)

    If you don't want to shuffle the questions, disable the call to the shuffleQuestion function in the On Start event.

    If you don't want to shuffle the answers, in event 5 you can swap both references to AdvancedRandom.Permutation(loopindex("j") to just loopindex("j")

    I did what you said but now when you press next question, the question doesnt change. It keeps going to question 1

  • left((Browser.ExecJS("Date()")),16)

    This will retrieve first 16 symbols from the left side of the string which will show Day of the Week, Month, Day & Year.

    Is there any way not to get day of the week?

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