Extending Construct 2 with Javascript

Discussion and feedback on Construct 2

Post » Mon Feb 14, 2011 5:42 pm

{#} is zero indexed.
It is showing {1} in the event editor because there isn't a 2nd parameter.
Use {0} instead and it should work.
B
79
S
24
G
54
Posts: 4,738
Reputation: 40,739

Post » Tue Feb 15, 2011 10:55 am

Thanks :)
B
2
S
2
G
1
Posts: 121
Reputation: 1,092

Post » Wed Feb 16, 2011 3:28 pm

Quick question. What do you use when none of flags apply? I am trying to make an array plugin; pf_singleglobal wouldn't apply to it, since it'd have to be multi-instanced. None of position/size ACE flags apply, either, since array is not a layout object.

So I set "flags": null, however that appears to cause a glitch; even though it is a non-layout object, when you add the object, it goes into layout placement mode. Click and it throws error.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Wed Feb 16, 2011 3:33 pm

"flags": 0

Zero means no flags!
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Wed Feb 16, 2011 3:35 pm

Ah, thanks. Probably want to document that.

Ninja edit: setting the "flags": 0 still causes that glitch, where non-layout object behaves as placeable world object (throwing the error as you place it)
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Wed Feb 16, 2011 3:50 pm

I have just been wondering something....

Since C2 uses library's like Jquery which i think has MIT License, when other objects are made possibly using other library's with other licenses how will this effect commercial use and would you have to credit all the library's in use etc?

I am guessing there will be some sort of notice for the objects list when they have one and web content like Jquery they are generally very relaxed but i figured i should ask.
B
2
S
2
G
1
Posts: 121
Reputation: 1,092

Post » Wed Feb 16, 2011 3:56 pm

Both MIT and BSD licenses allow for commercial use, providing you leave in the license text.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Wed Feb 16, 2011 4:27 pm

Still grokking along with that array plugin. Seems that non-layout objects don't display properties. Moreover, that "flags" : 0 seems to regard the object as a layout object.

Doesn't look like I'll get anything useful done at the moment.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Wed Feb 16, 2011 4:59 pm

Yeah, you want a non-layout non-single-global plugin type for Array, which unfortunately there isn't support for right now...

Edit: did you also try setting "type": "object" in the plugin settings?
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Wed Feb 16, 2011 5:04 pm

That's what I started with. I'll wait a bit before I continue!
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: Mirlas and 9 guests