AnD4D's Forum Posts

  • A simple example of how I can parse a string via tokenat and compare the right part as a number or as a string.

    Using this method you can pull out the right parts of the string.

    But I would rather do everything through arrays, it's better than parsing files.

    Unfortunately that won't work, as you're only checking if it's equal to 5. What if I need to check if it's less than, or greater than, or a different number entirely?

    Also, you're only checking that the numbers match. I need to check the number against a particular variable which could change at any time.

    I could brute force it and account for every combination, but that wouldn't be remotely efficient.

    In the end, I decided to do it in javascript and convert everything to a string for the comparison.

    let tokens = runtime.globalVars.Example.split(' ');
    let variableName = tokens[0];
    let comparison = tokens[1];
    let comparisonValue = '"' + tokens[2] + '"';
    let value = '"' + runtime.globalVars[variableName].toString() + '"';
    runtime.globalVars.PassFail = eval(`${value} ${comparison} ${comparisonValue}`) ? 'PASS' : 'FAIL';
    

    I can then check the PassFail var to see if it was a match or not.

  • Hi.

    Can you tell me what problem you are trying to solve.

    If I gave you a text file with "varName == 5" in it, how would you code Construct 3 so that it checked if varName is equal to 5.

    Additionally, how would you code it if "varName <=2"

    Additionally, what if "varName == XYZ". How would you code it so you can check if the variable varName is XYZ?

  • Say I have a string called strVar that contains the text "Example == 5"

    How would I be able to run a check that a variable called "Example" is equal to 5?

    Additionally, if the string was changed to "Example <= 5" how would I be able to check that it is equal or less than 5?

    I've been unable to figure out how to reference a variable by a string.

    I tried putting strVar in an evaluate expression, and hoping that would just work, but sadly it doesn't.

  • What other Steam games are there that were made with Construct 3? I imagine all of them are suddenly getting this issue.

  • If you save your prject in a higher version you cannot open the project in a lower version later. The version number is saved as a string within the file.

    The reason for this is that some new features (or breaking changes) might be introduced in newer versions.

    If you for sure know that you have not used any new functionality you can alter your files to switch back to the old version.

    As mentioned, I reverted to 344.2 then tried to open a version saved with that version. That's the error message. If I try to open something newer, it won't let me. It says "This was saved with 350."

    It won't let me open these files in 344.2. That's the issue. I can open files saved earlier than 344.2, but not those saved with it.

    this is not due to r350 but the nwjs version being falsely marked as a trojan (https://github.com/nwjs/nw.js/issues/8090). You should be able to keep using 350, but be sure to export with an older nwjs version

    I'm exporting with v71 in the nw.js as that's the only one that works with Steam. It's the same version I've been exporting with for 4 months without issue.

  • I have been working on a game for months on Steam. It has been played without issue for all that time.

    I recently updated to version 350, and suddenly all my exports are being registered as containing viruses.

    I decided to revert back to version 344.2, but now it's unable to open any projects that it used to be able to. It says

    These files worked fine when I was working in v344.2 so why aren't they now?

  • dop2000 suggested I try changing the way fullscreen was being called... and holy hell... that seems to have fixed it.

    Hopefully this thread helps others if they run into the same issue!

    What do you mean "Changing the way fullscreen was being called"? I'd love to try that out, but I'm not sure what it means.

  • I used to play my game on the Steam Deck without any issues at all. Then, one day, it suddenly stopped working. I didn't change anything apart from upgrading to a new stable build.

    That was approximately 6 weeks ago. Never been able to get it working again since.

  • For example, if I'm looking for the Steam plugin, so I type in the word "Steam".

    I get this:

    That doesn't help me. I seem to remember it has the word green in it, so I type that in and get:

    This is even further away from what I want. So I do a google search and it shows me Greenworks. I type that in, and finally I get:

    If I have to use an external system to search your website, it's a pretty good sign that there's something wrong.

    Any chance this can be improved? Needing to know what you're specifically looking for just to find something isn't very useful.

    Also, note that when I do a search for "Greenworks" Greenworks_Redraw doesn't even appear. That is some VERY specific requirements in the search engine.

  • I'm also looking for info about this.

    My game has multiplayer, and it grabs the user's Steam name. No idea how I'm meant to do this with Epic or GOG.

  • I know I can do it by keeping track of who joins and who leaves, but is there a particular reason I can't just grab this data from the multiplayer object?

    If I look at the multiplayer object in debug at runtime, I can see a list of the connected players... so why can't I access this data from there?

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Might be able to help if I could see the code.

  • You do not have permission to view this post

  • This should be pretty simple, but I'm struggling somewhat.

    Say I have audio of a crowd, which I have split up into 5 different audio tracks.

    This is so the game will randomize which parts of the crowd to play, so it doesn't simply sound like it's on loop.

    So I have Crowd01 with a "Crowd" tag play at -100 vol, then fade in to 0 vol over 1 second.

    I then have another event that checks the current position of the track, and when it detects that it's 5 seconds away from the end, it will fade out over 5 seconds.

    This all works fine.

    The problem codes when I want it to then play another Crowd tag, and have that fade in while the other tag fades out.

    When the process loops, and Crowd02 starts playing, and the code tells it to fade in, Construct tells both Crowd01 and Crowd02 to fade in, which overwrites the initial fade out.

    The only way I can think to remedy this is to have each audio track have a unique tag, which increases, so I don't repeat the issue.

    But this seems incredibly stupid. Why don't we have a fade in/out option when initially playing the track?

    Am I missing something simple?

    How would you fade out audio?

  • That's weird... it's just on onedrive...