TMAJA's Forum Posts

  • >

    > > ScoreB = int(10.7)

    > >

    >

    > Thanks granpa! Perfect.

    >

    You might also want to lookup Ceil , Round , and Floor

    ceil(x) Round up x e.g. ceil(5.1) = 6

    floor(x) Round down x e.g. floor(5.9) = 5

    round(x) Round x to the nearest whole number e.g. round(5.6) = 6

    Thank you! Its always nice to get a bit of extra information along with a helpful answer.

    Very much appreciated.

  • ScoreB = int(10.7)

    Thanks granpa! Perfect.

  • Hi SW99,

    I know exactly where your coming from; I'm currently using a system of a global variable and the audio devices 'is any playing' but inverted.

    Looks something like

    On Layout Start -

    System:play music = YES - Audio:play "mymusic"

    Audio: Is any playing (inverted)

    It basically means that if there is already anything playing (on my game only the music is playing right at the start of the layout) it doesn't re-play the music.

    It's not perfect and if its not what your looking for I hope someone else can chip in and suggest something better! (Which I will gladly swap too also).

    Cheers

  • Hi everyone,

    In this scenario I have two scores, (ScoreA and ScoreB) where ScoreB is simply a factor of the ScoreA (say ScoreA divided by 10). Of course though this means ScoreB ends up being numbers like 1.1. How do I make it so that ScoreB is ONLY whole numbers?

    For Example:

    ScoreA = 107

    divided by 10

    ScoreB = 10.7

    How can I make it so scoreB only shows 10 (omitting or removing the .7).

    Thanks!

  • Hi henriquesv,

    thank you very much for your help, that looks perfect!

    I will give that a try and let you know how I go (or if I need any more assistance =) .

    thanks again!

  • Hi henriquesv,

    thanks for your advice - I just tried our your logic and it works - just not quite how I imagined it!

    What I am looking for is a little more open ended. By that I mean instead of targeting a specific touch frequency, I would like the sprite to change colour gradually as the user taps faster and faster.

    Any ideas?

    Thanks again for helping out!

  • Hi everyone,

    Could be a really simple question but it has me stumped.

    I would like to change the colour of a sprite depending on how fast the user taps the screen.

    For example:

    no taps - white sprite

    lots of taps - red sprite

    I don't have a problem changing the colour of the sprite, but how can I measure the frequency of the users taps?

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • "default" mode just asks Windows to launch the default browser. It should be the same one that runs when you double-click a .html file. If for some reason Windows' configuration gets messed up and it can't launch the default browser, try just selecting a specific browser in the 'Preview browser' property.

    Hi Ashley,

    sorry I must not have been clear in my original post - as per the instructions in the error message I changed the 'default' option to chrome, then IE, then firefox (restarting inbetween each ect). All of the choices gave the same error. I also tried 'custom' and specified a direct link to the Chrome.exe. Still got the same error.

    The error fixed itself when I stopped running Construct 2 as administrator. <--- this was the problem.

  • Well that was one 3 hour long headache.

    Apparently this behaviour is somehow linked to running Construct 2 in administrator mode. Which is odd considering you need to run it in administrator mode to access LAN preview?!

  • I turned Construct 2 on this morning to find that it simply refused to preview my project any longer (or any other project in Construct 2 for that matter).

    I press the launch button as usual, but I get a warning entitled:

    HTML5 exporter

    Unable to launch browser '(default)' for preview. Please ensure the latest version of this browser is installed on the computer.

    It them directs me to change the browser defaults in the project settings.

    Tired that, no luck. I even specified 'custom' and directly input the chrome.exe location. Still nothing.

    The error remains the same.

    Can anyone shed some light on this absurd behaviour?

    I have also noticed that none of the links in Construct 2 open a browser... 'forums' 'help' and 'Scirra.com' now do nothing?!

    Help!