i need help with calling functions from script into event sheet

0 favourites
  • 3 posts
From the Asset Store
Very simple code without excess options (15 events for server and 11 events for client)
  • i need help with calling functions from script into event sheet

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • To call JavaScript functions from within an event sheet in Construct 3, you need to use the "JavaScript" action.

    ou can add JavaScript directly to your Construct 3 project using the "Script" or "JavaScript" action.

    Script File: You can include an external JavaScript file by adding it to your project’s Scripts folder or by linking it in the index.html file if you have access to it.

    Inline JavaScript: Alternatively, you can add JavaScript code directly within Construct 3.

    In Construct 3, use the "Execute JavaScript" action to call JavaScript functions.

    Open the Event Sheet:

    Go to the "Event Sheet" where you want to call the JavaScript function.

    Add Action:

    Add a new action to the event.

    Choose "System" (or the appropriate object where you want to execute the JavaScript).

    Select "Execute JavaScript".

    Enter JavaScript Code:

    In the action’s properties, you can write the JavaScript code to call your function.

  • If you are loading the js into an html element you can do this:

    parent.c3_callFunction("MyFunction", [MyParam]);

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)