resdesign's Recent Forum Activity

  • Here is a sample of what I am trying to do though since I really needed this to be done I just added LileTween to the textboxes in the real game.

    The reason I am doing this is because textboxes are always on the top no matter what layer they are in as they are drawn with canvas and in the game i have feedback screen that move in depending on the answers.

    As you can see in the example, when method 2 is the one that is chosen, the textboxes do not appear at their place in the array.

    Of course in the real game I have a lot of questions that are randomized and since the placement is different depending on method 1 and 2 and the question, I draw the positions from the arrays.

    https://www.dropbox.com/s/ex448lk0v4xgm ... .capx?dl=0

  • I love this behavior! It is such a great tool and I use it a lot.

    I am not sure whether this question has already been asked.

    I have a screen that tweens in and out depending on some other events.

    I have pinned three objects to it that will be at a different place depending on 2 different conditions.

    However it does not seem to respond to the different positions I assign to them for case 1 or case 2.

    Is there a reason why this is happening?

    Possibly i would need to unpin these objects, reposition them and pin them again to the screen before they start?

  • Thanks. That's great!

  • BTW I have one more question about the text boxes. When the text is a number with decimals when adding the text to the sprite font it cuts off zero likes $ 10.00 becomes $ 10, 0.70 becomes 0.7.

    How do you format the text so it shows correctly?

  • Magistross.

    Fantastic. This is going to correct my problem. I tried it with my 2 layers:

    feedback

    spritefonts

    And it is working perfectly.

    THANKS YOU!!!!

  • Thank you guys. This is kind of what I figure out. Creating a work around is such a pain because I have so many things going on in this project.

    Magitross: Thank you for your example. I am going to try and see how I can implement that in my game.

    C2 developpers could have given us the ability to set regular text to input text. It was their choice to use canvas which is not the best for that IMHO. I have worked a lot with Adobe Edge Animate and JavaScript and you can use text input object on layers and have layers above without using canvas but plain html/css code.

  • I am confused. Can I use spritefont to be input text? I guess I would need to givei it html code to act as input text but I am not really sure how to do that.

    I did not realize that the rendering was Canvas so I guess this makes sense though it surprises me since html does have input text.

  • My setup:

    layer position and description:

      HUD - this layer contains feedback screens (it is a global layer built in a different layout) GAME - this layer contains the input text boxes with submit buttons BG - this layer contains the background

    When the student presses the submit button, a feedback screen appears .

    Unfortunately though the feedback screen should be on the top to the textboxes since the HUD layer is above the GAME layer, they still appear above the feedback screen.

    Does anyone know how to correc this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I gave up the continuous event using on touching because it is just too fast to be able to stop at the correct time that needs to match the question. Instead I increment or decrement by 5 and rotate 30 degrees for minutes and 2.5 degrees for hours. Both are going at the same time like a regular clock.

    This is different than setting up a clock for which there is a tutorial on this forum which I just discovered.

    https://www.scirra.com/tutorials/1450/v ... -24h-clock

    Since the student is the one who moves the hands the setup has to be different. I have a down button to go counterclockwise and a up button to go clockwise.

    This was more complicated than just setting up a digital clock that goes only clockwise on its own.

    I found the anwser for this if it helps someone. I decided to use only minutes in the background to make checking variables easier. Then I convert the time for the digital clock that is needing to be the same as the analog clock.

    Global variables
    hourText
    minuteText
    // conversion
    set hourtext to int(timer/60)
    set minuteText to int(timer % 60)[/code:5ox8tjk7]
    
    1- I check to see if the time chosen is AM or PM.
    2- The starting point has to be checked depending on AM or PM (see below) 
    3- for the display I use this on every tick:
    [code:5ox8tjk7]if hourtxt <12 then set text to right("00" & hourText,2) & ":" & right("00" & minuteTxt,2) & " " & timeChoice
    if hourtxt >11 then set text to right("00" & hourText-12,2) & ":" & right("00" & minuteTxt,2) & " " & timeChoice[/code:5ox8tjk7]
    So now it is all working. 
    
    Resetting the timer variable in order to have the correct start time depending on AM or PM
    [code:5ox8tjk7]// global variables: 
    timeChoice = ""
    timer = 0
    
    //UP/Clockwise button:
    if timer = 0 and timeChoice = "AM"  set timer to 0
    if timer = 0 and timeChoice = "PM" set timer to 720
    
    //DOWN/Counterclockwise buttton:
    if timer = 0 and timeChoice = "AM"  set timer to 720
    if timer = 0 and timeChoice = "PM" set timer to 1440
    if timer = 720 and timeChoice = "PM" set timer to 1440[/code:5ox8tjk7]
  • You also could use:

    "Time: " & right("00" & timer,2) & "m" & right("00" & timer,2)& "s"[/code:19mo87c1]
  • Very good information for the formatting of time. You just do not know this automatically. I used it in an educational game where students have to set an analog clock and it syncs and displays in a digital clock and it works perfectly.

  • It's actually hard to manage on a continuous move of the hands which works with touch in touch because of the lack of precision in the moves.

    The way I had it before on touch on touch was this:

    I added the variables minute and hour because I compare these in order to find out it they got the time correct. I have the correct answers for minutes, hours, and AM or PM in arrays. Of course it does not work when going clockwise because I get negative number and I probably need to reset the minutes to 60 to subtract from 60 instead of 0 in that direction.

    Hum...

    Thinking about it...

    I am thinking that maybe I need to just calculate the minutes compare to a whole day (60*24) instead. That way for example 7:30 PM would be in military time 19:30 or 19*60 + 30. Does this make sense?

    The code here is:

resdesign's avatar

resdesign

Member since 5 Nov, 2015

Twitter
resdesign has 1 followers

Connect with resdesign

Trophy Case

  • 9-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

11/44
How to earn trophies