Sami424's Forum Posts

  • Edit: so importing and exporting functions is working for me.

    How do i import a class for example a sub class that i made ? Do i have to instantiate the class before using it like

    Let myClass = new myClass():
  • Im not sure what i am doing wrong,

    Lets say i create a class :

    class myClass
    {
    Let x = 5;
    
    alertUser()
    { 
    alert('works');
    }
    } 

    Now in main.js i need to import this class right ?

    import * as myClass from ("./myClass.js");
    
     

    Even if i add export to the class, this still gives me undefined class error, what am i doing wrong? I know programming i am just stuck on the import/export part.

    I am trying this in the main.js file so i am not trying to run scripts from event sheet.

  • Chadori is still on it i see 🤣 great job, been using your plugins for years now..

  • Here is main.js:

    let myNumber = 5;
    
    export function getMyNumber(){
    return myNumber;
    }

    here is importsForEvents.js

    import { getMyNumber } from "./main.js";
    

    Purpose of the imports file is set to import for events.

    Why is getMyNumber() still undefined when ran on start of layout in event sheet as script?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can I make Money to Publish game on free Online Arcade in Construct 3 Own Platform.

    How to monetize ads?

    https://www.construct.net/en/free-online-games/ninja-samurai-runner-online-37157

    Dont think you can add ads to the scirra arcade, but you can add it to your own HTML exports, and mobile exports using Admobs plugin.

  • Hi, I am getting a black screen, when I hit preview button. Why ?

    I am using Firebase BASIC Pack (12.0.2). I need a solution for this, please.

    When i delete the Firebase BASIC Pack (12.0.2), it works fine.

    So why is this happening.

    Are you on chromebook? Also try using chrome, better than firefox.

  • You do not have permission to view this post

  • Yeah but the IronSource Addon from this guy is 160$, only worth it if my game becomes a great success. If you earn „only“ a couple hundred bucks per month from advertising mediation does not really get you higher ecpm, because other networks often value customers with larger audiences. At least thats what I‘ve heard.

    It is true, but you also get alot of other plugins from Chadori, which are amazing.

    But you can also try to make your own plugin using instructions from ironsource documentation.

    But i get your point, i am not sure if there is a cheaper addon out there.

  • its possible to change button color ?

    You use CSS styling for this, in event sheet, for example

    On start of layout > Button1 > Set CSS style "background-color" to "red".

    There are different commands for bg,text color etc. See w3schools guide:

    w3schools.com/css/css3_buttons.asp

  • constructcollection.com/tutorials/ironsource/introduction

    No way with the current ADMOB plugin i think, use the above plugin it works well.

  • This happens every time when I refresh my game while in the inspect mode. And it only happens when selecting an iPhone. Samsung or Pixel phones load the game. What does this error mean. Help please.

    Is Worker mode set to off? Just curious

  • Can anyone make a Construct 2-compatible voice chat plugin ? I really need it for my game project.

    I've seen some forum and some people said its possible to make a voice chat plugin using JavaScript and WebRTC. The problem is no one make it (there's a guy who make it but the plugin is dead rn). And I dont know how to make a plugin.

    Also they're providing link and code to make the plugin, just check all of them by googling "voice chat construct 2"

    I would be so glad if someone managed to make it. Thanks in advance !

    You can use Photon engine for this i think, search for photon on google, you can find photon plugins in the addons page of c3

  • ur using instance variables, so use Sprite(or textbox) > compare instance variable > Textbox.nr = sprite.mynum

  • Update:

    If I get off and back onto my project, the bar appears until I click somewhere, so it isn't completely gone, but this is still a problem.

    you cant click View> bars and find it there?