Kenthria's Recent Forum Activity

  • Problem Description

    A simple but big issue. I found that when subtracting or adding to a global variable by 0.2, that the sum jumps wildly and then corrects itself a lot. whether dropping by a random 0.00000000005 or when hitting 0 jumping to huge amounts of decimals, and not 0.

    I spotted this when transfering the variable to a spritefont, and checked it with the debug to confirm the problem. It also occurs when telling the game to add 0.2 every second, eliminating player involvement.

    Attach a Capx

    https://www.dropbox.com/s/xy04jybonj1jz ... .capx?dl=0

    Description of Capx

    The Capx is really simple. You can just use the keyboard commands at the bottom of the events to see the issue in the debug. I hope this is good enough.

    Steps to Reproduce Bug

    • Create a global variable - number type
    • Create any method of trigger- keyboard trigger/set to timer
    • Run in debug and watch the variable when triggered over time.

    Observed Result

    A list of results from the most recent attempt to add by 0.2:

    5.4... 5.6000000000000005... 5.800000000000001... 6.000000000000001... to...6.800000000000002... to... 8.799999999999999...9.099999999999998

    Expected Result

    0.2... 0.4... 0.6... 0.8... 1...

    Affected Browsers

    • Chrome: (YES)

    Operating System and Service Pack

    Windows 10 64 bit

    Construct 2 Version ID

    beta r237

  • Fixed it! Did a simple variable removal for now but I will look into the IsSaved for local storage! This is just for Saturday's demo release.

    Thank you all

  • Is there another way to detect a save?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh right I think i get what you're saying. So as the game reopens with IsSaved on default- 0, it doesnt let me load the game, but the save (hopefully) is still there. Yeh the IsSaved is when a save has happened. I wonder how to get passed it?

  • I'm firstly wondering if with the NWJS export, if the .exe is ran and a save is made- if you run again if it should load?

    There is nothing in the game set to delete saves, only override on a new game. :/

  • It's a game ready for Greenlight so i cannot do that. I just need to know if it's standard and how to fix. The capx wouldnt reveal anything.

  • Hey so i'm exporting NWJS, using C2's save/load feature. When I save the game, close it, and then reload the same .exe file and click load, there is no save? Is this supposed to happen??

  • I've tried using WebGL's 'Replace Color', 'Set color' and 'Adjust HSL' effects to change my game object's color settings, but found it's best to just use pre-made image files.

    Also, it seems you need to use an absolute color when modifying WebGL effects. <img src="{SMILIES_PATH}/icon_e_confused.gif" alt=":?" title="Confused">

    viewtopic.php?f=147&t=123505&p=878382

    viewtopic.php?f=146&t=76577&p=633697

    Here's my example on using pre-made image files to change my object's color.

    https://www.dropbox.com/s/bx6m0kg98mpo3 ... .capx?dl=0

    Cute capx, but my game is a lot more realistic and less arcade style. There's 4 types of subs that need to be recoloured the same, and each has like 20 animations in it anyway, so times all that by the current choice of 10 colours haha...

    But i have managed to find a solution, Id post it but i cant simply paste onto here for some reason.

  • > Selecting the new colour and telling it to change to rgb grey doesnt work...

    >

    The submarine has grey, yellow and red. I want to change grey only. So if colour is set to yellow, then is set to grey like that. It has to set to grey from picking the newly added colour, so it then makes the yellow part grey too.

  • Using the ReplaceColour effect, one that is set to say in my case, make a submarine go from gray to blue, how do i reset to grey? Selecting the new colour and telling it to change to rgb grey doesnt work, and if i disable the effect it surely wont work as what i am aiming to do is reset to the base sprite colour, then replace to any colour.

    Thanks.

  • Kenthria

    Pause behavior sets time-sale of the object, and physics behavior will reference time-scale only when set stepping mode to "Framerate independent". See this sample capx.

    Thanks!

  • I'm pausing an object, it has physics applied to it. It has the behaviour and setting to pause is doing absolutely nothing to it.

    It should stop where it is and retain all values (such as velocity) right?

Kenthria's avatar

Kenthria

Member since 30 Dec, 2014

None one is following Kenthria yet!

Connect with Kenthria

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies