We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Detect user input during app initialization?

Home Forums Puzzles Detect user input during app initialization?

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #83503
    c4cc
    Customer

    during scene loading, how to detect user input like mouseclicks? I’m trying to get variable puzzles’ values triggered for fullscreen even though scene is initially loading, via clicking on fullscreen html element

    Meaning the puzzle variables’ values for small screen mode still apply when app is fullscreened via html element, during app initialization.

    These only work after scene loads. How to get variable values for fullscreen to trigger before scene loads?

    • This topic was modified 2 months, 1 week ago by c4cc.

    FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e

    #83505
    c4cc
    Customer

    Example: The fullscreen feature here still functions as intended when clicked on before the game is fully initialized.

    I’m trying to get my fullscreen with puzzles to do the same.

    • This reply was modified 2 months, 1 week ago by c4cc.

    FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e

    #83507
    QiangGe
    Participant

    The fullscreen feature here still functions as intended when clicked on before the game is fully initialized.

    Try this method **before** the scene or app.container is created. in Init tab

    • This reply was modified 2 months, 1 week ago by QiangGe.
    #83515
    c4cc
    Customer

    Thanks for trying to answer, but when this game’s: fullscreen html element is clicked on while loading, the game speeds recognizes fullscreen mode while loading, thus the game runs at that appropriate speed.

    I’m trying to get my app to do the same when html fullscreen is clicked on before init is complete. So its variable puzzle values’ for fullscreen mode applies once fullscreen html element is clicked on during the initializing process.

    FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e

    #83551
    c4cc
    Customer

    Can anyone help me here please?

    FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e

    #83558
    kdv
    Participant

    I’m trying to get variable puzzles’ values triggered for fullscreen even though scene is initially loading

    variables used in the Init tab are not seen and can’t be used in other tabs.

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #83559
    c4cc
    Customer

    Any way for puzzles to respond when user input for html element is clicked on during app initialization?

    FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e

    #83560
    QiangGe
    Participant

    Any way for puzzles to respond when user input for html element is clicked on during app initialization?

    As KDV mentioned, variables aren’t shared between the Init and Play stages.
    We can simply move the fullscreen event puzzle from the first tab to the other tab, with one condition: the custom fullscreen element must not be placed in the parent document.

    This way, you can trigger the fullscreen event during the Init stage, and once loading is complete, those variables will automatically update. There’s no need to modify them in the Init stage, because changing them early won’t have any effect before the game finishes loading.

    • This reply was modified 2 months, 1 week ago by QiangGe.
    • This reply was modified 2 months, 1 week ago by QiangGe.
    #83565
    c4cc
    Customer

    Sorry for the stupid question, but what is Vv4D here?

    FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e

    #83566
    QiangGe
    Participant

    but what is Vv4D here?

    Since we used the preloader puzzle, the default loading progress bar is no longer available.
    So I added the simplest progress bar plugin puzzle. In the current example, this puzzle is already disabled, so you can consider it as if it’s not there—it won’t affect loading.

    Perhaps you haven’t used plugin puzzles before, so I’ve shared a set of free puzzle installation packages that include this puzzle. You can download and use them freely.

    For installation instructions, you can check the documentation page and search for “Example Plugin.”

    #83568
    c4cc
    Customer

    sorry, I tried this but it didn’t work

    Init tab

    Other tabs

    FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e

    #83693
    QiangGe
    Participant

    sorry, I tried this but it didn’t work

    The key is that you modified the variable, but I didn’t see you calling it,
    The update can be triggered only when it is called. You can call it in the full screen event or in the animation cycle

    #83696
    c4cc
    Customer

    How is the procedure puzzles in your example above relevant to calling puzzles? All it does is f12 print to console comments

    • This reply was modified 2 months ago by c4cc.
    • This reply was modified 2 months ago by c4cc.
    • This reply was modified 2 months ago by c4cc.
    • This reply was modified 2 months ago by c4cc.

    FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e

    #83765
    QiangGe
    Participant

    How is the procedure puzzles in your example above relevant to calling puzzles? All it does is f12 print to console comments

    Using console.log is the easiest way to check things. When you toggle fullscreen mode, you can see how the variable values change.

    Exactly how you use these variables in your project depends on your game’s setup. If possible, could you zip up the whole project and upload it somewhere like Google Drive? Then I can take a closer look and help figure out the missing pieces.

    #83818
    c4cc
    Customer

    Hold it, I’ll upload it asap

    FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e

Viewing 15 posts - 1 through 15 (of 19 total)
  • You must be logged in to reply to this topic.