Unconnected's Forum Posts

  • You do not have permission to view this post

  • I just realized If I make layer "menu" visible in layout 1 and go to layout 2 the layer is not visible. If I go back to layout 1 it is visible again. I only just realized it now because I was manually setting menu layer visible/invisible for other reasons and decided to stop doing it. Is there a way to prevent C3 from independently remembering layer visibility between layouts on it's own? It is happening automatically, do I have to manually set layer visibility between layouts or is there a way to systematically disable it?

    Layer Menu is a global layer.

    dropbox.com/s/faw6mtwy9re3ntv/layoutMenu.c3p

    I am using C3 as an app in a just updated chrome.

    Chrome is up to date

    Version 110.0.5481.97 (Official Build) (64-bit)

    C3

    Release r327.2 stable

  • I have been away for a while, I should of known that. Thanks

  • I was told that CPU limits to only 1 task at a time.

    I just want to confirm, but I think it doesn't fully matter since C3 reads logic in order one line at a time.

  • If by chance a function is called at the exact time multiple times in the same tick.

    Will the function run multiple times parallel or will it run multiple times in a queue?

  • 1,2 gets a syntax error in the editor and "1,2" looks for key 1,2.

    'Add key' makes a new key called 1,2.

  • I don't know what you mean by "1,2". It would just look for key 1,2 instead of key 1 token 2. I am guessing it isn't possible. I am currently just setting a string and then setting it to a dictionary key. I have a 'for each' loop to set the string, I feel I shouldn't need one there though.

    I will probably just use an array and set it to dictionary key AsJSON. It may simplify what I am doing and get rid of that loop. Right now I have objects getting info from other objects to create a new object, an array will make it more simple. I still would rather just be able to set a token though.

  • Yes I know, it is why I didn't post a c3p. I was wanting to know how to set the token or if it had to be structured a specific way. 'Add key' makes a new key with the token value.

    I was thinking I will have to use a string or array and setting it's value properly then setting the dictionary key to it, but I was wanting to avoid that. It seems like an unnecessary extra step.

  • I thought it would only really be the expression, but here. It is only 2 events.

    Edited to remove dead link.

  • tokenat(src, index, separator)

    I have Dictionary: Set Key tokenat(Dictionary.Get("Inventory"),2,",") to value "A" but it doesn't seem to be doing anything in runtime.

    If I set a variable to tokenat(Dictionary.Get("Inventory"),2,",") then it gives the proper token value.

    How do I set a token in a dictionary?

    How do I add a token to the dictionary key?

    I mostly need to know how to structure it differently or a different expression. I am guessing it is selecting the value of the token instead of the token. I haven't figured out how to select the token.

  • I understand this may be a large ask, but I am not sure. I also don't know the limits of BigInt/Script. Can somebody make me a C3p with Script and BigInt so I can Add, Subtract, Multiply, Divide and Exponent with large numbers. This shouldn't be a big ask, but I need about 4 decimal on division for accuracy. I have a mostly done C3p that does those maths with stings, but feel BigInt, Script will perform better.

  • Yes you are right about forcing input with number fields, then you can grab it with a string if needed. What I am working on is just in the debugger right now so there isn't a user input. What I was preparing it for has a text field. I selected a text field over a number field because there is a List object that changes what digits and non-digits are allowed. I was only wanting to know what the error meant. I wasn't sure if the site was giving a false alarm or not because I found another site that didn't give the error. I ended up using (^[0+\D]*)*(\D) for now. I checked on a few sites and it gave the proper results without the error. I couldn't have made it without you for sure. I will need to adjust it later for specific characters when I move it to another project, but I understand how to add a few search patterns now. Thanks again for the help.

    mrcgkh Thanks, I looked at it and already have something similar. Regex is efficient and I need that because the project I am going to use it in has a few loops already.

  • I understand it on a basic level. I didn't think of a non-digit in the leading zero. I have to look up [] now, but I need to understand that anyway. It does give the same warning though.

    "WARNING: The expression can return empty matches, and may match infinitely in some cases."

    Will that effect my C3? I don't fully understand what would trigger it or it's full implications in C3. I have a feeling it is a conflict between * after the leading zero group and the global flag and probably doesn't really mean anything. I just want to confirm. I appreciate your help.

    *******edit************

    I tested it on about 10 regex test sites and most didn't give an error. The few that did all looked the same, as if they took the first sites code. I am more confident it is fine now and was just a false flag.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have regexr.com saved I just don't fully understand how to use Regex on that site yet. I can only seem to add a search pattern and Global flag seems to always be on. I mostly didn't know that ( )( ) separated. That was mostly what I needed. Than you again.

    ===edit===

    While typing this I looked at the site again and I just figured it out. There is a dropdown that you have to use to select flags. Also I was expecting a Replace parameter.

    (\D)*(^0+)* /g is working on site and C3. The site is giving me a warning if g flag is on, but it won't work without it. "WARNING: The expression can return empty matches, and may match infinitely in some cases." Is this something I need to worry about, in C3?

  • I am sorry I need one last thing... I want to remove leading Zeros and all non-digits. Is there a way I can do this together or do I need to do this separately.

    I know RegexReplace(String, "^0+", "", "") will remove leading Zeros

    I know RegexReplace(String, "\D", "g", "") will remove all non-Digits

    After posting this I realize the g flag may mess up the ^0+....