How do I use python code?

0 favourites
  • 2 posts
From the Asset Store
5 levels with simple coding Source-code (.c3p) + HTML5 Exported
  • Hey guys,

    I would like to know if there is any way i can incorporate python code in C2 using a plugin or sumting?

    Thanks,

    Ashwin

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, I guess you could, be it might but pretty complex and delicate.

    For sure, C2's runtime is javascript and not meant by default to execute python.

    A quick google search seems to return some python compiled/ers into javascript.

    You could first compile your python code and then use the browser object's actions "Execute javascript" nor "ExecJS".

    Be sure to read the "Risks with Javascript string execution" of the manual article, and be sure about what you're doing.

    Also it's a long stretch, relying on external compilers, hoping they are compatible and compliant with the same JS standards used by C2 and browsers, and then making sure you're executing their code correctly.

    Maybe you should detail a bit more what exactly is your intent by using Python.

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