johnsmith's Forum Posts

  • Hello,

    I have time based Leaderboards in my game.

    I count the time by adding dt every tick and my timer looks like something like this: 19.975983000000404

    From Google Play guidelines:

    [quote:262a2f9z]Time leaderboards present scores in hours / minutes / seconds / hundredths of a second format. You must submit scores as milliseconds, so 66032 would be interpreted as 1:06.03.

    So I use round(timer*1000) to have 19977 - wich works fine (gives 19.98 in the leaderboard)

    But I'm wondering how can I display 19977 as 00:19:98 (M:S:MS) in my game ?

    i've found this formula:

    zeropad(floor(timer/60),2) & ":" & zeropad(floor(timer)%60,2) & ":" & zeropad(round(timer*100)%100,2)

    but it needs modifications to works with round(timer*1000) and since i'm not friendly with Math it's hard for me to figure out .. Anyone know how to modify it accordingly ?

    Thank you if you can help !

  • Hello,

    I'm using array for generating a house.

    I have a "stairs1" somewhere in my array, how do I retrieve it so I can set a "stairs2" above it ?

    What I have so far (and not working at all):

    On start of layout

    For each XY elements

    Value at Array.curX, Array.curY = "stairs1" ----> set value at Array.curX, Array.curY+1 to "stairs2"

    Thank you if you can help !

    EDIT: got it working, was a stupid mistake somewhere else...

  • Ok finally got it to work.

    Found out that the conditions else, trigger once & every X seconds were confusing the instances system. Seems to work so far without them (and without for each)

    Here's my events if you're interrested:

  • Hello,

    I've created an enemy with custom movements. Since it always goes toward the player, I need to deactivate it when it's off-screen so it remains where it's placed and doesn't travel the whole level to meet the player.

    What I did works well with only one instance, but with multiple instances, it goes crazy.....

    I think I need to use the "for each" but really....can't figure out how to use it properly, I just seem to make things worse...

    Anyone know how to use it properly ? Many thanks if you can help !

  • Thanks guys

    Noga Congrats on reaching level 10 ! (most of my friends can't even pass level 1...but they're not really into games) You will soon encounter new gameplay mechanics (level 14 & 18 more exactly)

  • Just a little update for IOS users, the game is now available on the app store !

    https://itunes.apple.com/us/app/lunar-mission/id969863507?l=fr&ls=1&mt=8

    Would love to hear what you think about it, and how far you can go !

  • I think you can compare opacity.

    opacity < 100 --> do that

  • Hello

    I would like to create a row of sprites aligned next to each other with random widths using an array

    Something like this:

    Where each X value defines the sprites's width

    I know how to create the sprites and get the correct width from the array, but how do I align them correctly (at the end of each previous sprite) ? Is there a simple way using the same array ?

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks guys

    JamesXXXYZ & Somebody: About the launch countdown...maybe I'll reduce it a bit (I guess it can be redundant if you keep dying & dying ^^ )

    rho Yes the permissions are from CocoonJS...I think they're "working" on removing them. There is also a turnaround (editing the apk) but that looked quite a hassle so yea..

  • Thanks Detteman and thanks for the rating !

  • Hello,

    Here is a little game I've been developing for quite some time now.

    It's a challenging game inspired by Lunar Lander, where you fly a spaceship in a low gravity environment and try to "carefully" land it

    Download it here:

    Google Play

    App Store

    Would love to hear what you think about it !

  • Hello

    Anyone know how are created infinite multi-scrolling games ?

    here is a video of this kind of game:

    The layout is always the same, so if you keep going through the same direction, you will always meet the same objects again & again at their X-Y coordinates (excepted if they are moving). So you somehow "teleport" to one side to another when you reach one end of the layout... it's kinda like an infinite runner but where you would start back at the beginning (uninterrupted / while keeping the same scrolling speed) when you reach the end... and with the same objects you encountered again.

    I dont understand how they are created (theoretically), anyone know how ?

  • johnsmith - your example also uses nonsensical events - I have no idea what you expect 'trigger once' underneath a loop to do, it just doesn't make sense. If the above fix doesn't work in that case, try making as simple as possible reproduction .capx and posting a new bug report (following all the guidelines) for that. As far as we are aware the Dictionary plugin is working fine and it's also a very simple plugin so it would be surprising if something was wrong with it.

    Thanks for your help Ashley.

    I've dowloaded the fix, but the problem was the same.

    I've removed all 'trigger once' as you said, and it's working now... So it was my mistake, sorry... Guess I still have to learn when to use "trigger once", gonna check the manual some more.

  • Can anyone confirm that r167 has fixed it?

    I still have my problem with the dictionary triggering order:

    This is the thread I've made (which contains a capx):

    As I'm not an expert I can't be sure I've done my dictionary events right, but then why would it work with r163 and not with r166 & 167 ?

  • Ah all right, thanks for the tip ! )