Ability to include things to edittime

For developers using the Construct 2 Javascript SDK

Post » Tue Mar 08, 2016 8:52 am

Message: shalmu can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
I can't believe you still don't have this possibility since 2012
can-you-include-new-scripts-with-the-edittime_t72359

  • What if I have a lot of diffirent aces, and I would like to split them to keep them in different files?
  • What if I have a huge drawing system that I want to keep in a separate file?
  • What if I have the same chunk of code that I want to use in 5 different plugins?

I realize that edittime works in a pure V8 context, but there are pure V8 libs, like Node.js, that allow to use require.

I was hoping it's gonna work in Construct, tried to separate the drawing stuff, wrote this:
Code: Select all
var draw = require('./drawEdit');
draw.draw();
But it wouldn't work.

Any thoughts about it?
B
6
S
2
Posts: 30
Reputation: 540

Post » Tue Mar 08, 2016 1:19 pm

Yeah, it kind of sucks. There's really not a lot you can do from the edittime script though, other than specify actions, conditions, expressions, properties, and a pretty limited (and different to the runtime again :P) rendering API. It should be significantly overhauled in Construct 3.
Scirra Founder
B
398
S
236
G
88
Posts: 24,428
Reputation: 194,625

Post » Tue Mar 08, 2016 1:30 pm

@Ashley

It is a good news!
B
108
S
26
G
272
Posts: 4,471
Reputation: 152,277


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests