NickRimer's Forum Posts

  • 53 Kb JPEG picture loads to sprite and then converts (with 5-6 seconds idle and 0 fps) into 400 kb text data..

    I'm just trying to understand the meaning of this procedure..

    It's a pity.. a had a lot of hopes on this conversion

  • The first part is about URL-checking system.

    What do I have?

    A list of URLs

    What do I need?

    Check every URL:

    1. It is an IMAGE

    2. There is no request errors on it

    Result?

    If they are all images and there are no errors - message 'All is OK'

    On any error - mark bad URLs with error type (not an image or 404 or ...)

    ----------

    The second part is about localfile's links

    What do I have?

    Several files on disk. Platform may be Browser, PC, Android, iOS.

    What do I need?

    1. Take path for every file like an URL or with other method to have access to them at any time with this link.

    2. Not to take path if it is not an image

    Common result is:

    save list of urls and file paths to a file

    I will attach my project file soon, you'll see what I have done (can't do it right now). But I can't make it to be universal for every platforms. Also I'll write you my problems. I've tried to make it for several hours, and no good results..

  • Aphrodite

    Hmmm.. well.. simple way..

    Thank you a lot!

  • Error has gone. And now I need to up this topic, because pictire is uploaded. Please, answer the question if you can.

  • Look at this forum screenshot and tell me is it possible? I can't find how.

    It can be very useful if you want to separarte answers for several people.

  • Yeah, I know tokenat expression.. and I just forget about it.

    Thank you! I think it will be better using it with tokencount at the same time!

    Question with edittime is opened.

    No ways to edit Text object row-by-row? Only using Set text action?

  • I understand that question maybe very-very easy but I can't formulate my search query correctly.

    I'm not a newbie in construct but I never need to solve this kind of problem earlier.

    The question Is about how to divide string into parts with newline divider. But without it.

    Example: This is a string in some .json file - "Hello, Commander! Let's do businness blah-blah-blah. Good Luck, Commander!"

    I want to read it and apply to Text object, but to make phrase "Good Luck, Commander!" on a newline.

    No problems with reading. How to make a newline? Is there a way to replace text with some special symbols (for example, in Pascal it was #13+#10) to make it happen?

    IMPORTANT! Arranging and reading 2 different strings and divide it with newline expression IS NOT A VARIANT!!! String is solid. We need to tear it apart with something, that can replace newline.

    The other question is how to make this through edittime?

    In Construct Classic for Text object we can open small window with MemoBox and write all text we want, needed amount of strings etc.

    In C2 we have just 1 string TEXT.. and no ways to put newline string here. Or there are some ways? Can you help?

  • This I know by myself.. My question was direct.

    Webfonts. On first layout. Check it was loaded. And only after it - show scene.

  • Hello!

    I think most of you knows how to use and install webfonts to use in projects.

    But all we know that loading and applying this fonts happens AFTER project preloading.

    So if we have Text object on first layout users will see OLD font and after some seconds - NEW font.

    Font-files are integrated into project, but we have some delay anyway.

    Of course we can use a show-delay before game start but can we guess certanly about delay value?

    For example, on my computer it can take ~1 sec. And what if on other is 2 or more?

    Any ways to speed-up their loading? Or ways to determine that fonts have already loaded.

    How this problem is solved by you?

  • Sorry, man.. I don't even know how to do what you knows..

  • There is nothing can stop you from using int() function.

    a = 0 //numeric var
    s = '5552368' //string var
    a = int(s); // a = 5552368
    
    beware: 
    a = 100
    s = 'text'
    a = int(s) // a = 0
    [/code:28jf9ltq]
    
    And now I read your question more attentively.. I understand, you want an Index of selected item in List plugin? It is [i]List.SelectedIndex[/i] expression.
  • You need to make such offsets by yourself..

    What prevents you from adding +360 degrees to negative angle?

    In geometry -90 degrees and 270 degrees are the same angle. I think you know it!

  • No, my code above is PSEUDOcode.

    So I understand you in programmable manner a sequence of your actions to do smth.

    To make this in C2 you need (let's disassemble my example):

    1. For object Button create string instance variable with name State. Its initial value must be initial state of your music. If pause - 'pause', if play - 'play'.

    2. Then create Event when you tap (with Touch plugin) or click (with Mouse plugin) this Button

    3. 1st sub-event of 2. event will be Button -- Compare instance variable with comparison Button.State = 'play'

    4. All sub-events of 3. event will be:

    4.1 Button -- Set value, pick State and set its value to 'pause'

    4.2 Button -- Set text and set text to ' ? '

    4.3 Any other actions to pause your music

    5. Then add another sub-event to 2. event: System -- Else and add new condition below Else - Button -- Compare instance variable with comparison Button.State = 'pause'

    6. All sub-events of 5. event will be:

    6.1 Button -- Set value, pick State and set its value to 'play'

    6.2 Button -- Set text and set text to ' ¦¦'

    6.3 Any other actions to play your music

    Do you understand so?

    Teach C2 and try to understand another's pseudocodes. I'll not write it so detail next time.

  • As I can understand the problem is that you can click object on hidden layer? And you want to avoid this.

    There are 2 ways I use to pass this around:

    1) Use Groups in Event Sheet. So you can activate and deactivate them whenever you want. It means - use special groups for layouts for events you need only when this layout is visible. May not works if you need both layers to show visible and this situation appears.

    2) The second way is to use Is on layer? and Is layer visible? conditions.

    Maybe there are other ways I never used.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can't definitely understand your problem..

    But if you don't want percisely 450 px, maybe it will be better to use percents? For example, 450 is 90% of 500 (450 = 500 * 0,9)