skymen's Forum Posts

  • This is a copy from the answer I provided on the Discord server, in case it might help anybody else.

    If I understand your struggle correctly you just want to have access to runtime globally

    Just add it to the global scope

    Something like this in your code will do.

    runOnStartup(async runtime => { globalThis.g_runtime = runtime })
    

    Then from any function, using g_runtime or globalThis.g_runtime will return the runtime object

    If you do not want runtime to be globally accessible however, there are other ways which I explained here:

    construct.net/en/tutorials/js-writing-javascript-modules-2384

    In summary, you can do this:

    runOnStartup(async runtime =>
    {
     let localVar; //Defines a local variable that will still be accessible to your global functions
     runtime.globalVar; //Defines a global variable in the runtime object
     runtime.globalFunction = () => {} //Defines a global function in the runtime object
     globalThis.globalVar; //Defines a global variable in the real global scope
     globalThis.globalFunction = () => {} //Defines a global function in the real global scope
     function localFunction () {} //Defines a local function that will still be accessible by your global functions
    });
    

    I do recommend reading through the tutorial as I go through a few other methods on how to properly design JS modules that are both powerful, easy to write, have access to whatever you might need and are easy to contain to avoid overlap with other modules and prevent external people from accessing unneeded data

  • Thank you very much, I will take a look a soon as possible :)

  • What has confused you?

  • HI Animate sadly that addon is very hard to port. That's mainly due to the fact that there is no accessible API for drawing text on the layout in C3.

    Also the C3 text plugin covers a lot of the tag text features now, so it's better for everyone to use it instead.

    Since it has 2.5 support, I really recommend you move to C3, and replace it with the regular text addon to be able to switch to c3runtime and add your missing features back.

    Sorry, but I don't see this plugin getting ported to C3runtime soon :(

    And finally, this is one of the rex plugins that should not get ported to C3runtime because new users might try using it when it's much better if they stay away from it because it won't get any kind of support or updates, and vanilla alternatives do exist, but this is the least important reason.

  • Hi, BL4CKWAT3R

    Well, moveto is one of the plugins that eren ported, he has a full list of the downloads hosted on the root of his github repo, right there:

    github.com/erenertugrul/construct-plugins

    and the download for moveto is here:

    github.com/erenertugrul/construct-plugins/raw/master/ported_plugins/behaviors/rex_moveto/dist/rex_moveto.c3addon

    If you need other plugins, take a look at the rest of the list, since the list is community maintained, it might not be always up to date. So if you find it somewhere, please add it to the list:

    docs.google.com/spreadsheets/d/1oxbmtXqXcW64IAU_4noZchLMxVrPeA4jD_rqTw35H2w/edit

  • Try Construct 3

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

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

    Download options for the file depend on the plugin. When you click the plugin's name and click on the version you want, it will either download the file directly, or take you to an addon exchange page, or to a github repo.

    In case you end up with an addon that only provides the github repo as a download option, you can take a look at the root of the repo if direct downloads are made available in the readme. If that is not the case, you can either download the entire repo, or dowload the files manually and recreate the C3 addon (which is usually just the folder in the repo zipped and renamed to use a .c3addon extension).

    What addon are you trying to download? Maybe I can help a bit more with that.

  • Well, if your email even remotely resembles that post, that's pretty normal you're not getting any answer. You need to have a project that is ready and serious before trying to contact them, and try to respect people and their time.

    Understand that matpow might not have time to read through every request he's getting and might be busy with something else at the moment.

    Anyway, please calm down.

  • Hello, C3 updates have been amazing lately, and lots of new features from the ideas website have been added and it's pretty amazing to see.

    However, there is one feature that was announced right when C3 was initially announced, and that nobody mentionned since, the Editor SDK:

    Especially since lots of new editors and editor tweaks have been made during the year, I suppose that you guys have some kind of framework in house that makes it easier to integrate new windows and items. I just wonder if that will be available to the public any time soon.

  • Ah.

    Yeah, ok. Only bug that remains is on Chrome for Mac then.

    EDIT: Firefox Mac has the same issues.

    Thanks for your help guys :)

  • Ok, in that case, it doesn't seem to work properly on Chrome for Mac. That's an issue as it doesn't solve the issue it was supposed to solve initially :/

    EDIT: Ok it works properly on Chrome and Firefox for Linux (Tested with PopOS) It works on Safari for Mac, but the font doesn't change back to the regular font used before the Emoji (and defaults to Times new roman) and loading Twemoji just seems to fail on Chrome for Mac.

    This is better than what I initially thought from my tests, I just happened to test with the worst possible tools. That bug with the font not reverting back seems to be a weird one though, you might wanna look into it

  • Oh? Weird. What Browser + version are you using? :o

  • Sure, I'll try to make something real quick

  • I am using the unicode emoji.

    Well, the emoji appears, it's just using the default system emoji set instead of my font.

    And wrapping the emoji unicode with font tags seems to make the emoji disappear :/

    EDIT: Note that I want to use emojis in Texts as well, not only textboxes

  • Hey,

    Emojis, as you might know, are a pain to deal with on the web. Everyone and their grandma has made a custom emoji set, and has made their own format for emoji fonts.

    (source: css-tricks.com/it-all-started-with-emoji-color-typography-on-the-web/)

    However things are starting to get better with things like EmojiOne, and Twemoji that are starting to give ways to use color fonts on every browser and have consistant emojis across all of them. This is great.

    However I can't seem to figure out how to get C3 to use my emoji font.

    Using a font bbcode tag doesn't work

    Including it using CSS doesn't seem to work either (I guess because it can't fetch the font file from the blob URL).

    Anyone has any idea if this is possible?