AnD4D's Forum Posts

  • Ahh, that seems to be a lot closer. I'm trying to have it display as 00:00:00, and have tweaked the code enough to show the first two sections correctly, but I'm falling down at the millisecond section which is either showing the full range of numbers, which is daft looking, or the right length but not showing the first 3 digits of the milliseconds:

    right("00"&(int(milliseconds / 60000) % 60),2) & ":" & right("00"&(int(milliseconds / 1000) % 60),2) & ":" & left(right("000"&(milliseconds % 1000),3),3)

  • Hi R0j0hound,

    Thank you for your reply. I'm not able to get that working I'm afraid.

    The code you have given me shows the timer very strangely. When it reaches 61 seconds, the other sections of the timer does not change, and it happily counts up to over 100 without the other seconds being added:

    E.G: 0:0:101.56789

    Do you know what I'm missing? At the moment I have:

    Add dt to timer

    Set t to timer%1000

    Set text to (int(t / 60000) % 60) & ":" & (int(t / 1000) % 60) & ":" & (t % 1000)

    This gives me the strange series of numbers.

  • :( That's one of the problems with beta... I can't open the example files from stable.

    Thanks for your help! I've tried to recreate what you've described, but it doesn't seem to be working, so I've installed r99 on my laptop.

    Never heard of zeropad, but this is giving exactly the same result that I currently have but with 3 milliseconds being shown rather than just 2. Judging from this, if I wanted to store the time as a best time, I would need to save all 3 things like I'm doing now (Mins/Secs/Mills)...

    Say for example I just have a random number of milliseconds. 12345678. Is there a formula which will allow me to convert this into minutes, seconds and milliseconds. This way, I only need to save the milliseconds for each level.

    My level works perfectly now, but it's untidy and I forsee it being hard to manage. It's around 24 events long, but I think I can get it lower than 10 with this other method.

  • Hi R0j0hound,

    Thank you for your reply. I'm not able to get that working I'm afraid. I currently have the code:

    Add dt to Timer

    Set minutes to floor(timer/60)

    Set seconds to floor(timer)%60

    Set milliseconds to timer%1000

    Set TimeScore text to:

    right("00"&minutes,2)&" : "&right("00"&seconds,2)&" : "&left(right("000"&float(milliseconds),3),2)

    I then convert these to milliseconds using:

    CurrentTimeVar = Milliseconds+(seconds/1000)+(Minutes/60000)

    However, this displays the milliseconds as 0.0000 and 1 second shows at 1.0000.

    The code you have given me shows the timer very strangely. When it reaches 61 seconds, the other sections of the timer does not change, and it happily counts up to over 100 without the other seconds being added:

    E.G: 0:0:101.56789

    At the moment it's being used for a best time, so I'm having to store the min, sec, and mil data. It would be a lot better if I just saved the mil and converted it to 00:00:00.

    Kind regards.

  • I have a timer set up which displays minutes:seconds:milliseconds. Each kind is its own variable. It's displaying it as a text box, and so I can not use it to compare best times, etc.

    I have a formula which converts all the variables into milliseconds, but am wondering if there's a way to split them back up into minutes, seconds and milliseconds.

    Or if there's a simple way to provide times and best times. It's turning into a real mind-bender.

  • Managed 33 seconds :) LOL! Scratch that... 54 seconds... Got killed by a missile. Slightly unusual :)

    Physics seems quite floaty. I'd try increasing gravity a little bit. Maybe let the penguin rotate so it's sliding down ramps, etc.

  • Thanks for that! I may have explained incorrectly though. I would say for example I would like 2 different layouts to appear on the same screen. Is that possible? Player 1 and player 2 at different points in a level for example, split screen?

  • What about round(random(1-8))?

    Think something's a little off that. Should I use round or float? Hmm...

    Also, do you need the "elses"?

  • Hey guys,

    Just having a think. Say for example I want to create a top down rpg... I then want to have a battle like pokemon or final fantasy. Effectively that's 2 different styles of games in 1. What is the best way to transition between the two modes. I can't just jump to the level, because I'd want the character to remain in the same place. Is it possible to have a separate layout on top of another layout, or do I have to just store every single aspect of the character's position, as well as every enemy, etc? Seems like a lot of information to store just to cut to a mini battle, or detailed menu screen.

  • What if you try "rotate towards" rather than "set", and set the degrees very high. Does that work?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ooh, I'd like to know this too. Haven't come to this part in the program yet, but it's always good to know.

  • It may have been useful to mention the iPhone in the first post <img src="smileys/smiley17.gif" border="0" align="middle" />

    What did you use to export? I had bad results with AppMobi and PhoneGap, but great results with CocoonJS. I also got poor results with the preview over LAN, but great results on my iPad playing the html file from my server.

  • Come on guys, there's still a day left!!! I was going to make a 3rd, but I'm away for the next few days! Let's get Construct 2 features out there! I was going to make a video tutorial about the Event instances, where you can share events across a number of levels, but also keep layout specific ones! Anyone feel like doing that?

    I also have someone interested in another feature, so I may make another when I get back for the hell of it :)

    Good luck to all!

    ONE DAY LEFT!!!

  • Hi all,

    as the title says, can anyone help with this? I am trying to copy an object that I have created a central revolute joint on. The object spins when a physics object hits it, so I know it's working, but if I copy and paste it, the copy just shakes, and does not rotate. Is this because it is trying to connect to the same joint as the other object?

  • Entry 2 - Toggle Disabled