resdesign's Forum Posts

  • Thank you guys for your answers and yes the solution is to use families and instance variables. Diego, a friend gave me the idea of using instance variables. Below is the description of the example. Not sure what this forum system is to post examples. Let me know and I can post it.

    Example:

    Set up:

    The stage has the following elements:

      musicBtn - code toggles music and changed the frame image of the button resetBtn - code resets the layout helpBtn - code sets the Y of the help screen to 0

    family is called pointables - the instance variable is cursorStyle = 1

    Above the stage and therefore hidden are:

    help screen

    closeBtn - the button is pinned to the help screen - the instance variable is cursorStyle = 1

    Code:

    1- if mouse is over over pointables and pointables instance variable is 1 then set cursor to hand

    2- if mouse is NOT over pointables then set cursor to normal - set closeBtn instance variable cursorType = 1

    3- helpBtn click event - set pointabled instance variable cursorType = 0 - set help screen Y = 0 set MUSIC BUTTON group Deactivated set RESET BUTTON group Deactivated

    4- closeBtn - set help screen Y = -500 - set pointables cursorType = 1 set MUSIC BUTTON group Activated - set RESET BUTTON group Activated

    So with lots of buttons it is more complicated but you get the idea. There is also the idea to add global variables to set and reset the instance variables.

  • I suppose this is a strange question but this happens to me all the time. I make education games for charter schools online programs.

    All my games are set up the same basic way:

    1- intro screen with a button to go to an help screen/layout

    2- a helpscreen before game that goes to the game screen/layout

    3- the game screen that contains 3 buttons - help, reset, and music. as well as other navigation buttons depending on the game.

    All buttons are made in a family for which I set the mouse cursor to hand on mouse over.

    Now when the user clicks on the help button, the help screen copy now on the HUD layer slides in.

    My problem is that even if I disable the buttons by disabling groups, there is still the problem of having the button cursors showing through which is a no-no. I have tried to move out buttons off the screen but sometimes it is very difficult when there are lots of elements with hand cursor.

    Is there another way I should approach this which is always happening in all the games?

  • imhotep22; Thank you. This is what I thought. Will do. Thanks for your input.

  • could anyone let me know if this has to do with image size limitation? Maybe FF does not like a large image.

  • Could someone test this to be sure it is universal? Please check on another browser first to see what you are looking at.

    The background long image does not appear in FF on Mac but does on all browsers on windows and others on Mac.

    Is there a known bug?

    see here: http://mjpagedesign.com/test/MEGAMALL/

    Note: The next button on the intro screen is slow to bring the next layout especially if clicked several times. So, click only once and wait. Maybe due to the fact that the next layout is heavy in graphics.

  • Thanks for your answer Ashley. I guess you are right. It must be a FF problem.

  • I just saw your answer. So I guess it does not work when you are using one event sheet for all the layouts.

    You will always need to have an event sheet for each layout for some code that is very specific like go to layout and on start of layout.

  • Needing some help. I have a game in which I have questions that need to be answered.

    These are graphs on which students need to read data and then click on dots to show the points on the graph.

    The dot sprite has an instance variable and I assigned the instance to each dot on the graph.

    I have a variable (answer) that increments to count the number of correct dots. Then when all the correct dots have been filed and the answer = 5, I have a feedback screen that tell them "good job".

    If they choose a wrong dot, they get the feedback "incorrect" even if answer<5.

    I have the same code to check each question. However the feedback screen appears only for the first question even when their answer is correct. This is driving me crazy.

    I use tweenLite to move the feedback screens in an out. I do not believe this is where the problem is since it works for the first question.

    Since there are 5 dots that are correct, I check if answer= 5 and then get the "good job" feedback. There are several things happening at the some time and only the feedback screen is the one that does not work on the other questions whether it is for the correct dots or the incorrect dots.

    Any idea?

    Note sure why the dropbox link is not working.

    Here is the same as URL

    https://www.dropbox.com/s/rkngd96dihsceju/feedback.png?dl=0

  • Unconnected:

    [quote:19edmqtx]I was meaning a new object with a new name and no variables.

    hat's a clone. It uses new memory since it is a new object as Newt said. Copy does not use new memory since it is an instance. At least it is how I understand it.

      For a copy:
        on stage
        ctrl drag right-click copy select copy/paste
        in project window Object type
        NA
      For a clone:
        on stage
        right-click and 'clone object type'
        in project window Object type
        right-click and clone
  • 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?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.