Nic_MDS's Recent Forum Activity

  • I got what I needed to work installing this plugin here:

    construct.net/en/make-games/addons/462/run-background

    It allowed the game to keep running some of the tasks in background. Does not work with the "Wait X Seconds" event, so if you have to play audio as a time based event, some math and comparisons with the WallClockTime variable should work fine.

    Won't work on Apple phones, though.

  • Hi guys! I have a game that runs on browser. In it, the player may want to keep hearing the audio of it even if doing other tasks (like reading a message or looking some social media app). The game keeps narrating some stuff while the player do other things in his phone.

    In the Audio Game Object, there's an option in it's properties called "Play in background". But it only plays in background the audio that has started playing while the player was looking into the game. Any audio that needs to be played after that one will not be able to be listened, needing the player to comeback and do some input.

    If it was a kind of a music player, the player would need to comeback to the app and hit the play button again to continue to listen to his music.

    Is this a bug? Is there some way to the user to keep listening to the narration of the game, that use different audio files, even when focusing on other apps?

    Thank you all in advance for any help provided! =)

  • Hello! I have a simple dropdown list in my game with ID set as drop1 and class dropdownlist.

    This list has 10 different options, but some of them have more impact than others, so I'm trying to change the color of those ones to be highlighted.

    I just can't figure out how to do it. Does someone knows any way to achieve that?

    Thank you all!

    Tagged:

  • I think there's no problem happening. You are unfocusing from one browser to another, and when that happens the game freezes.

    If you play in two focused browsers using different PCs or Smartphones it will probably look as intended. :)

  • I got it guys, thank you! I did like newt said and made a simple first screen that asks the user to touch or click the screen before starting anything else.

    But I'm still curious about why all the audios that had to be played while the user didn't touch the screen play at once. It happens on Chrome. Not like it's a big deal, just a curiosity!

    Again, thank you all for your answers. =)

    EDIT: I just got to read the page Ashley recommended and got it. Thank you!

  • Even the problem with the audios playing all at once? Thanks for the answer.

  • Hey community! Hope you all are doing well.

    I'm in a project where the game runs itself with not so much input from the user, sometimes there's no input from them at all.

    It runs on Browsers. The catch is, when the user starts the game, if he doesn't click or touch the game, it doesn't play the audios. And when the player touches it, all the audios that had to have been played plays at the same time in one shot! And after that, it goes all well.

    Is there any way to make the game start focused when we open the link? Not requiring the player to click or touch the screen in order to do that?

    Thanks a lot for anyone that can help!

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • On the action where you play the Background Music, put the optional tag on it (it can be anything you want).

    Then, right before where you play your Death Jingle, put the action "Stop" from the Audio Object.

    Inside this action there's an option where you can "aim" it at a tag. Write the you chose in the "Play Background Music" action.

  • [DOUBLE POST, sorry]

    Well, I didn't figured out how to access the data from the iFrame... But I did a workaround without using the iFrame Object.

    For anyone interested (sorry if I get any terms wrongly, I use Construct in portuguese):

    -----

    -Using AJAX, BinaryData and Video game objects.

    -On Start of Layout, set AJAX binary response to BinaryData Game Object.

    -Still on Start of Layout, request via AJAX the URL "https://link.com/video.mp4" with the tag "videotest" or anything else.

    -AJAX On "videotest" completed, set Video source (H.264) to BinaryData.GetURL. Don't know if it works using WebM or Ogg Theora, but it probably does)

    -----

    This will make the video play after the time it takes to download (you can see if it's downloading using the Video On Progress event).

    Doing this way I can use On Video Ended to trigger the action to change the Layout.

    See y'all!

  • Hey guys! In my project I have an layout that plays an mp4 video from a iFrame.

    I need to check when the video ends playing so I can move the game forward to the next layout.

    I can not make any alterations server-side...

    Does anyone know how could I access the time in seconds of the video being played from the iFrame? It would be awesome! I've been searching a lot, but didn't found anything.

    Thank you!!

    Tagged:

  • You may be able to use LocalStorage.

    When the Layout starts, verify the existence of an item called "tutorialFlag".

    Then create an event called "When item exists" (or something like that, I use Construct in other language). If it exists, deactivate the tutorial, destroy it or what you prefer.

    To end it, once the player finishes your tutorial, simply create an action of the LocalStorage called "Define Item" with the name "tutorialFlag" and set it to 1. You could even create an event called "On Item Defined" to show some visual cue indicating some kind of save state, like a little green thumbs up that appears for 3 seconds and then disappears.

  • Hey man. One way would be to local store the last time your game has been played, maybe doing some verifications from time to time when it is being played.

    When your player opens your game again, compare the actual time with the last time it has been played (stored in local storage) and update your health bar accordingly.

    This is not a very good approach. It may lead the players to cheat in your game. A good way would be to do it using an external web server to better protect the data. Basically doing the same thing, but verifying and storing time values from and on the server.

    Also, I just found a topic here in the forum called "HOW DO I COMPARE TIME BETWEEN GAME SESSIONS ?". The guy have a google drive link with an example about it.

    https://www.construct.net/en/forum/construct-3/how-do-i-8/how-do-i-compare-time-between-141171?kws=elapsed%2btime

Nic_MDS's avatar

Nic_MDS

Member since 30 Jun, 2015

None one is following Nic_MDS yet!

Trophy Case

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

Progress

11/44
How to earn trophies