klabundee's Forum Posts

  • Yes you can, I have the situation you wrote..

    A layout just to have all sprites.

    If you need specific conditions to each sprite you can add a simple variable to define the layout, so, instead of a simple condition like:

    "On click sprite - do" you will have:

    "On click sprite" and sprite variable layout = layoutX - do

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Have you tried the C3 runtime?

    Can you send a short video showing the delay?

    Does it happen when running on preview mode?

  • Oh, now I got it.

    Its an app opening the index...

    try removing:

    "&&alert("Exported games won't work until you upload them. (When running on the file: protocol, browsers block many features from working for security reasons.)")"

    Inside scripts/main.js

  • You can setup a simple webserver on his computer.

    Install wamp and just drop the files inside the root folder and try it at 127.0.0.1

  • Show us your camera code.

  • Why instead of having 2 a second condition "On destroyed" just create a sub action inside the main one: If Health <= 0

    • Destroy
    • Start Timer
  • You can do this way:

    Event sheet 1 / Layout 1 = Create a global variable and:

    Button, On clicked -> Variable set value to 0

    Event sheet 2 / Layout 2:

    Compare variable -> IF = 0

    - Sprite -> Destroy

  • I did a simple test using my project, it is only in test mode on google play dev, so it's not published (IDK if it may afect), I'm able to login and retrieve some infos about my account but it was not possible to set a new score. It simple doesn't work.

  • OK, so to definitely show how it works I did a simple project showing the result.

    So, what it does?

    Every 0.5 seconds, it will increase 1 to the Text box called Score.

    - It will calc Score /10 and Score %10

    After that, it will compare IF Score%10 is equal to 0, if IS so, say WHOLE NUMBER else, NOT A WHOLE NUMBER.

    And you can see that it works as you asked, because it only show WHOLE NUMBER when also Score/10 = whole number and Score%10 = 0.

    And it works for any number if you change %10 to %8 it will be a WHOLE NUMBER only when the Score is divisible by 8.

  • When you use % and compare to 0, if = 0 it means that the number is divisible by 10 as you asked before.

    For example:

    10%10 if = 0 means that the first number is divisible by the second.

    Is score divisible(%) per 10? If yes you need to compare with 0 to know.

    Is the same as is the result of score/10 = a whole number?

  • To be honest, I don't know which's the best option.

    I also have 2 projects that would need remote database and I'm struggling about the server side security.

    Would be awesome to have a native mysql client plugin.

  • OK - so float(Score)%10 is the expression I need, but how do I complete the following:

    System > float(Score)%10 -> If the result is a whole number then do A, else do B

    Don't create a system expression... if you do this it will trigger every tick what means that it will test Score%10 every moment even without change the value of the score.

    What I suggest..

    In the same action that increment the Score value, create a sub event (That means that this sub event will only trigger when the Score changes)

    So it will be like:

    Trigger that increment Score

    + (Sub Event) If Score%10 = 0 -> ACTION

    + ELSE -> ANOTHER ACTION

    You only need float() if you are working with a string like I was in my example.

    If you are working with numbers, just do straight Score%10

  • If its an online game, keep it all on the server side..

    Otherwise if I "hack" the app I can change troop stats.

    So when it starts it sends a request to get this stats from the server and also you can compare after if the stats still "correct" between client/server.

  • I don't know this function that you are looking for but you can do as workaround:

    You can compare the result of score/10 with: round(score/10)

    If is not equal is because the result of score/10 is not a whole number.

    Edit:

    I found it.

    Just compare: score%10 and compare it with 0

    If score%10 = 0

    - Whole Number

    Else

    - Not Whole

  • After your question I did a research about it and found an answer that I was not expecting.

    gs.statcounter.com/screen-resolution-stats/mobile/worldwide

    These stats shows that 40% of the mobiles all around the globe uses 360x640.. I was expecting something like 480x854, 360x640 is 3:4 not even 9:16..

    Well.. I don't know... my projects are at least 480x854.

    I don't think that the resolution is a big problem for a small device like a smart phone, just make sure to use 3:4 or 9:16 and it will upscale to fullscreen without issues, its barely visible the changes from a native resolution.

    Edit: I found something interesting that may afect the result of these stats. I don't know where the data came from but if they collected it by using the browser resolution of each user as reference.. it does not show the real mobile device resolution. If you check your resolution on your mobile using bestfirms.com/what-is-my-screen-resolution it will show a very small resolution.. even if you device is 4k. So, just to say that if they collected this data using browser resolution, it does not show the real mobile resolution.