NickRimer's Forum Posts

  • gioca72 for example Browser plugin has 2 actions: Go to URL and Open URL in new window. Maybe they will help you.

  • Asmodean Oh, yeah! Thank you, bro! I've just really not guess about that Pick condition simply become false. I thought that it have to try to pick objects and return 0 or smth. like that if there are no objects meeting the condition.

  • zenox98 thank you for this. Will this feature return in future?

    Anyhow, the source file is there:

    LINK: dropmefiles.com/Hf3lB

    Construct version: C2 r214 beta

    File TTL: 14 days

  • Hello everybody!

    For example I have 5 sprites. All of them has Opacity = 0 by default. After event's triggers some of these sprites can get Opacity = 100 or lose it again to zero.

    Next in final point of algorithm I ask to Pick Sprite where Sprite.Opacity = 100 and then compare Sprite.PickedCount with another variable.

    It works OK if we have at least 1 such sprite. But if have no such sprites Sprite.PickedCount returns NOTHING. And I expect for 0 (or even null). And this is the problem.

    I.e. when I try to know how many sprites was picked it does not trigger neither Sprite.PickedCount = var nor "empty" Else.

    Also if we ask C2 to write Text -> Set text -> Sprite.PickedCount this action will not trigger (Text value stay permanent) as there is no events approaching.

    Any ideas about this?

    Of course I can loop For each Sprite and search for Sprite.Opacity = 0 and increase some variable by 1 when success. And if there is no such sprites this value will stay 0 by default.

    But this decision is not so "beautiful" like the first.

    P.S. I want to attach source file to this post. It's strange but I can't find where to do this.

  • Tested in chrome browser under Win8.1

    I have a FileChooser.

    Click on it and then choose NO files! (just press Cancel)

    Event On change will not trigger.

    But then clicking on FileChooser has no response... file open dialog doesn't apeear..

    What a bug? How to solve this?

    The same bug is when choose file, then click FileChooser and choose THE SAME file. Event On changed will not trigger! How to solve?

    Else doesn't work with On change. And this event can't be inverted..

  • Noncentz705 Good solution! Thank you for help!

  • Hello!

    Who knows how to set FileChooser size - width and height - to values I want?

    Objective is to overlap it with Sprite plugin. I can set

    opacity: 0;[/code:2fbivwl9] property, but plugin size is according to text it contains. And I want to fix it to make FileChooser's size equal to Sprite size. It will save from many problems with different platforms and languages (I think so). It will guarantee that FileChooser will not stick out the sprite or to be much smaller. And it will give more space for button fantasy of course.
    
    For example:
    [code:2fbivwl9]width : 100 px;
    height: 100 px;[/code:2fbivwl9]has no effect!
  • Jakzon not bad!! your solution is the best! and it must be realized!

  • What about this plugin?

    https:// scirra.com /forum/plugin-mouse-lock-v0-5-updated_t102112

  • It seems to be impossible with C2 basics.. Maybe someone can propose you a javascript solution..

  • Noncentz705 Man, I've just received a private message from you but I can't answer because of reputation limitations..

    Maybe you can write me your e-mail for better communication?

    I want to know more about your brand-new version! The plugin is great in simplicity. And I'm confused that it is only one.. great luck that I found your plugin.

  • lennaert I'll take a look at this right now and tell you about results!

    ----- UPDATE

    WOW! Paster.imgURL works more-more-nore faster than Sprite.ExtractImage.currentImage behavior "Extract sprite to base64 string" by Pode

    I've just made an experiment on one of files:

    Paster - about 1..1,5 seconds

    ExtractImage - about 10..11 (!!!) seconds

    I will use Paster for now! Thank you very much for your time and help!!

    And with jsZIP plugin by Noncentz705 I can now zip all this image data to one file and reload it any time I want

    The only difference is that base64 format often has bigger weight. For example, my uploaded 53 kB JPEG converts into 300 kB PNG

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have images on local. I can load them to sprite.

    I need to to save them all to another place.

    Maybe in one folder. Maybe to compress them and save like one file data (zip or smth. else).

    What variant could you reccomend? My decision is below but it's not so good as I want.

    ----- MY WAY (very bad)

    Use plugin "jsZip" by Noncentz705

    Use behavior "Extract sprite to base64 string" by Pode

    1. Sprite -> Load image from URL (FileChooser.FileURLAt(0))
    2. Sprite.ExtractImage.currentImage
    3. jsZip.AddImage ...
    [/code:2donmpr5]
    
    What is bad? Step 2!
    
    Step 2 is long. Image is not big, but conversion takes several seconds. And all program is in idle (fps 0 and so on)! Harder image - harder base64 - more time - more weight.
    You can try. In attachment you can find 2 different images jpg 53kb. One is mtg card, another is excel icon.
    After zipping mtg card picture in archive will be too big (it is a result of step 2) - 53 Kb image converts to 300 Kb image. Not so good.. But 53 kb of icon converts great to 48 kb..
    
    Take file from here: http://rghost.ru/6J6Xk7jMK
    Sorry, it's in russian. just click on BLACK button 'Скачать'
  • Noncentz705

    Hello!

    I'm trying to zip images loaded with FileChooser this way:

    1. Pick file 001.jpg (53 Kb) with FileChooser
    2. Create archive with tag "img"
    3. Add image with dataURL 'FileChooser.FileURLAt(0)' with name "001.jpg" to archive with tag "img"
    4. Invoke download archive with tag "img" with name "archive.zip" (no matter Compression is true or false)
    [/code:2k3ggz9w]
    And then I have archive.zip (1 Kb) with file 001.jpg (48 bytes) inside and of course image is bad, no data.
    
    Image is correct and has image/jpeg MIME type.
    FileChooser.FileURLAt(0) is correct too, because Sprite loads it well with Sprite - Load Image from URL action.
    
    Where am I wrong? What is wrong? What did I forget?
    
    P.S. And also what mean actions Clear Texture and Get Texture?
    
    ---------------------------- UPDATE
    
    I've just understand my mistake. URL is not dataURL.
    Now I make an image conversion to base64 string with "Extract sprite to base64 string" plugin by @Pode and all works good.
    
    Another question is: any ways to make dataURL? For example without base64.
    53 Kb image converts to 300 Kb image. It's very BAD!!!
  • lennaert

    With FileChooser I can take a FileChooser.FileURLAt(0) after picking the file.

    But if I store this "URL" and then will try to access file with this link in another session - it's a bad way. Because it will be incorrect link.

    On the other way FileChooser.FileNameAt(0) gives just a filename and no path to it. So I can't find this file next time knowing just its name even in this session..

    I need to save some path to local file to access it in any session (of course with condition that file is in its place)

    In NodeWebkit it's easy. What about other platforms?