tm2000's Forum Posts

  • OK thanks - tried that, but it didn't work. It's only loading the digits before the decimal point.

    The values in the DB say:

    1. Andy 12.34

    2. Andy 12.45

    3. Andy 15.65

    But i my leaderboard they show as:

    1. Andy 12

    2. Andy 12

    3. Andy 15

    So it seems as though the plugin, or construct is rounding the number before displaying it somehow.

  • Thanks for your reply!

    Do you mean in the actual database, or within Constuct?

    Sorry - fairly new to this, and not sure where to look.

    In the database itself, the values are set up as 'text', and the times (scores) look correct.

  • Hmm Thanks - I've just searched the PHP files which game with it - nothing relating to floor/round/ceil/trunk in those.

    Or do you mean within Construct itself?

  • Hi All.

    I an using the Leaderboard plugin, which creates a leaderboard and submits the scores to a mySQL database. Works great, but one problem.

    The game is a driving game, which records the time taken to go round the track.

    The score records the time in seconds.milliseconds, and in the MySQL database, the scores are indeed stored in this fashion: (e.g. 12.34)

    But, when the leaderboard publishes the scores, which are being pulled down form the database, it only show seconds - e.g. 12

    scirra.com/store/construct2-plugins/easyleaderboard-4145

    Has anyone used this plugin, and would you know how to add the full entry form the database?

    I contacted the author of the plugin, but haven't heard back.

  • Wow thanks - but this has totally lost me!

    I think you’re right - I should create all the instances around the track with visibility set to invisible and then what I want to do is toggle the visibility of them in a random order each time there is a collision with the first one. So there are never more than one on visible at a time.

    So if I have:

    SpriteA

    SpriteB

    SpriteC

    SpriteA is visible from layout start

    When the car collides with SpriteA, randomly choose another Sprite from the list (in this example B or C) and make that visible.

    If the car collides with the new one, again, choose a random Sprite from the list to make visible next.

    Does this make sense?

    Thanks so much

    Andy

  • Thanks - but that will spawn anywhere on the screen don’t it?

    I need to endure they spawn along my race track, which is full of twists and turns.

    Apologies if I didn’t explain myself

  • Hi there,

    is there a way to randomly spawn an item every X seconds within a certain area?

    I have a top down racer, so I want power ups to appear randomly along the track.

    Thanks!!

    Andy

  • Hi,

    I am building a simple racing game.

    i have a power up which on collision, is supposed to boost the car to double speed for five seconds, and then return to the original max-speed.

    I tried this:

    and this:

    but neither seem to affect the car's speed at all!

    I replaced it with 'stop' and that works fine.

    Any idea what I'm doing wrong?

    Thanks

    Andy

  • That worked perfectly thank you.

    I just have a button on the title screen, and if the user clicks the mouse, I know they are on a PC, and if they tap, then I know they are on a mobile device, and can show the controls based on this.

    Thank you again

    Andy

  • Hi There,

    I have a game which has on screen touch controls for mobile and tablet.

    But for desktop, I want to hide those controls, because they will be impossible to use with a mouse, and the player should use the keyboard instead.

    I have all the controls working, but I can't figure out how to hide the mobile controls on desktop?

    I thought I could use CSS to hide them with media queries (e.g. screen (max-width:768px) { #controls:display:none; } but i cannot assign an ID, and even if i did, it doesn't appear in the hitml so the external CSS file wouldn't work.

    Is there another way?

    Thanks in advance!

    Andy

  • Thank you - yes I think I have bitten off more than i can chew!

    If you (or anyone else) is interested in helping me finish this project (paid of course) that would be great. I will continue learning, but on something a little less complex.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Would you be interested in helping finish this on a paid basis?

    I'm running out of time, and although i want to learn all this, i think the learning curve is a bit steep!

    Let me know if you are interested.

    The things left to do are:

    1. Show the timer constantly on the screen so users can see their time in realtime.

    2. Fix the issue so that the restart game resets the timers.

    Let me know

    Thanks

    Andy

  • I have been trying to replicate the function for resetCP - but I cannot get it to work.

    I have a button to 'replay' and I tried attaching a function to that to reset the 'aTimes' array. like this:

    But it's not doing anything.

    I'm not sure what I'm doing wrong?

  • Thank you - I will look at that. I thought this was a simple one to start on!

  • Hi

    I am creating a web game which uses arrows to control the car, but in mobile/tablet I’m providing sprite controls. I don’t want the sprites to appear on desktop. Is there any way to leverage css to hide them with media queries?

    Or just a way to hide them from desktop users within construct?

    Thanks in advance

    Andy