Rable's Forum Posts

  • Hi everyone,

    I'm encountering problems with functions. When a function referring to different instances of the same object, or different objects of the same family is called multiple times in the same tick, weird results may happen.

    I've made a very simple capx to show what I meant:

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

    In this capx, 2 objects of the same size and of the same family are partly superposed, and a function putting them to red color is called when you hover over an object of that family.

    The result is the following:

    When hovering both objects at the same time, only one object is put to red.

    When hovering an object, then the other one, the second object is put to red only when you're not hovering the first object anymore.

    Is there a way to make this function work as intended, i.e. having both object turn to red when they are hovered together?

    By the way that is what happens if you're not using functions but just putting "set animatin to red" as the action of the first event, but I would like to use functions if possible.

    Thanks ! <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • Thanks a lot for the update. This is much appreciated!

    Supporting NW 0.28 is life changing, as for some reason preview with NW didn't work with 0.27 for me.

    Updating to SDK 1.42 right now.

  • It's working now! I just forgot to hit that big "publish" button at the back of the Steamworks interface.

    Thanks a lot for the help, MadSpy .

  • Hi MadSpy and thanks a lot for the help.

    I was very surprised to see the following error message in the console:

    The achievement name seems to be somehow not valid, even though it is just "test". I double checked that there was no space added in Steam, but it's not the case. As you can see from the screenshot in my previous post, the name seems to be the same in Steam and in the code so I'm still scratching my head here. I even tried to add a capital to "Test" in C2 in case it is the actually displayed name which needed to be put in the code, but it's not working either.

    Could the Uncaught ReferenceError be the problem?

    Anything else I can try?

    Thanks!

  • Hi,

    After a few days, I'm still unable to make the achievements work in my game.

    Here's my test code

    When exported to Steam, the screen displays "SteamOK", then "Error" when I press spacebar (espace).

    I'm using NW.JS v0.27 (even though I can't preview the game with it for some reason) and the corresponding Steam4C2-Basic version.

    Is there anything else that should be configured in steamworks (except the normal configuration of achievements, as shown below the code) in order to have achievements to work?

    Any suggestion of what I'm doing wrong? AJ2DI maybe?

    Thanks!

    [Edit] I'm using SDK 1.41.0.1 with plugin v. 1.5.1, which seems correct. At the time of posting I was using SDK 1.42, but changing everything to 1.41.0.1 didn't help in any way. I placed all the files from the SDK in the project files as mentionned in the plugin's documentation.

  • rexrainbow

    I updated the plug-in (only the runtime.js has been updated if I'm correct) and tried the capx I submitted in my previous reply, but it's still not working for me.

  • rexrainbow

    Thanks for your reply.

    After investigating, the problem only arises when resuming with the built-in audio plug-in and setting the sound at 0dB. In that case, it seems impossible to play the music again with the built-in audio plug-in

    When resuming with the audiohelper plug-in, everything seems to work just fine.

    Here is a capx if you're interested. But I'll just use the audiohelper plug-in to resume from now on, so no urgent fix needed as far as I'm concerned.

  • Hi rexrainbow ,

    For your information, I encountered the same kind of bug we were talking 5 replies above this one while using the "pause" with fade out functionality of Audio Helper. It works fine with "stop", but "pause" still make the tag to be shut down forever.

    Cheers and thanks a lot for your hard work!

  • Thanks a lot for the replies, really helpful!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi everyone,

    Is there a way to somehow allow an HTML5 game to automatically reset cache at the start of the game, so that the previous versions are ignored?

    Or any workaround that would automatically load the latest version of the game if the player already played an older version of it on the same address (changing the address is not an option) and that older version is still in the cache?

    Thanks!

  • Hey, thanks for the reply and the suggestion. In any case it seems to be quite a lot of work to do this simple thing. I guess that's the only way to do it though, so I'll make that list of all groups.

  • Hi everyone,

    I have a big game and I scratching my head about how to make the "go back to main menu" feature simple.

    The first obvious step is to reset all global variables, but as far as I know all the groups will retain their current activation status if the player doesn't quit the game, which causes problems. I can't find a feature such as "reset all groups to default activation status", do anyone know if it is hidden somewhere? Or is it a workaround?

    Worst case scenario I have to review all the code and manually reset hundreds of groups, with possible bugs if I forget just one, which I'd like to avoid.

    Thanks in advance for your help!

  • Thanks for the reply. I've been using

    Keyboard.StringFromKeyCode(floor(random(42)+48))

    for the last 2 years or so to generate random characters, but your option is probably simpler.

    I suppose the index should be random(0,25) (instead of (0, 26) ) in your example, though?

  • You definitely should check this.

    https://www.scirra.com/store/construct2 ... lugin-3679

    I use it in a project and it's well worth the price.

  • Thanks rexrainbow for the super-quick port to C3! I wasn't even expecting Pause_dt behavior would be already ported! Great job! <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    Now I just need the SCML plugin to switch to C3, but I think & lucid are waiting for scirra to release this : https://github.com/Scirra/Construct-3-bugs/issues/510

    more info here:

    https://brashmonkey.com/forum/index.php ... nstruct-3/