Laurent's Forum Posts

  • In my game, time passes : t=t+1 or t=t+0.5 depending how log an action takes.

    Some events have to occur everytime t is increased by 1 (not by 0.5)

    How do I check :

    When t is incremented by 1 -> action ?

  • Thank you Ashley

    Everything was working great but didn't anymore when the project was exported to apk.

    And even in apk, everything worked as if array was loaded, information from array displayed and then array cleared instantly after.

    And how can I implant error checking ?

  • OK, this is verey very tricky. I found where the problem was.

    In the project properties, Export file structure has to be set to 'Folders'. And then everything works.

    I don't know why.

    Any clue about that Ashley ?

  • Thanks for your suggestion. Apparently, it doesn't work better on tablet.

    Thing is that everything is fine on preview, including remote preview on tablet, but it doesn't work anymore when exported to debug apk

    Here is the source https://www.dropbox.com/s/nipft4w6of41lb3/VideoPlayer_Tablette_4.c3p?dl=0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • My project is a video player with a menu to change langage. Text boxes are :

    - Video title "TitreAcceuil"

    - Video subtitle "SoustitreAccueil"

    When you click on a little flag button (subtitlefamily), info in text boxes change to selected langage. Flags have a value (Fr, Bzh, En) for each langage. These values are also related to numbers (1,2, 3) to fetch related info in array.

    When app starts, languages are loaded in an array (InfosArray) from a json (infos.json)

    Here is a screen copy of the code.

    Every thing works fine in preview, html export.

    But when I export to apk, array are loaded then emptied at the same time. I don't know what happens. I have similar projects using arrays that work fine in apk.

    Waht is happening here ???

    I can provide the c3p if needed

    Tagged:

  • Laurent The best solution would be pasting them on a drawing canvas. Then either flip the canvas or load the image from the canvas into a sprite.

    I thought about something like this :

    - create page with all its elements

    - paste this composition in a canvas

    - use this image for the page.

    But I'm afraid it would need to display and snapshot every image of the book to befor assembling the book. This would take time and the usr would see every page in advance

  • Works pretty well.

    Do you have an idea on how to flip a page made with different elements : page + text box + image ?

  • Wow ! That is very impressive. Next step could be to add front and back images, more pages and why not, a way to animate an group of items (image + text boxes with hierachy) :)

  • Here is a demo I made some time ago, it's not as good as in the link you posted, but maybe you can get some ideas from it:

    https://www.dropbox.com/s/3kmqfu32z6ogrxg/PageFlip2.c3p?dl=0

    Thank you !! That is very interesting, I'll learn a lot from it :)

  • Hello,

    I would like to simulated a page fliping. Not just a rectangle being rotated in 3D but a real folding page depending on where the user touches/drag the page.

    Something like this : cssscript.com/demo/book-page-flip-animation

    Library is here : cssscript.com/book-page-flip-animation

    I guess mesh deformer would be involved but have no other clue on how to simulate this.

    Alternative : page flip could in a more simplier way be activated by clicking on the page.

    Tagged:

  • Thank you. That was it, my code was on the wrong sheet....

  • I'm building an app for a museum and need to have it reset to menu when it's not used for 30 seconds, so that the next visitor can start from the begining.

    I used a function to restart a timer each time screen is touched and start a function once the timer has reached 30 seconds but it does nothing (timer behaviour is attached to a random sprite in the game, here the background image):

    + Touch: On any touch start

    -> Sprite: Start Timer "Inaction" for 10 (Once)

    + Sprite: On Timer "Inaction"

    -> Do something

  • Thank you very much ! It works very well.

    Actually, I'm keeping column names and use them to find out the column number because I may have later to reorganise the array and thus won't have to change the numbers.

    Here's the code I'm using :

    array.At(Array.At(Array.IndexOf("Episode"),loopindex), loopindex)

  • Information for the sprites are stored in sprite variables.

    Two variables are manually assigned to the sprites :

    - Episode

    - Sequence

    Name variable has to be assigned runtime from the following array

    I made a "for each sprite loop" to look into the array and pick the sprite that matches two conditions :

    - Array.At(Array.IndexOf("Episode"),Array.IndexOf(Sprite.Episode)) = Sprite.Episode

    - Array.At(Array.IndexOf("Sequance"),Array.IndexOf(Sprite.Sequence)) = Sprite.Sequence

    How do I get the line index of the line that matches the two conditions ?

    Tagged:

  • It works like a charm.

    Thank you !!