Plugin to interact with Array?

For developers using the Construct 2 Javascript SDK

Post » Wed Jun 11, 2014 3:14 pm

Hi all,

I'm currently working on a new plugin where I have to do actions (read and write) to an array. To have everything nicely fit into C2, I wanted to add it as a behavior for arrays but found out that you can't add behaviors to it :(

Not I am thinking about interacting with the array object, but can't really find the starting point on how to do it.

What I try to achieve is, that I read the size of the array and fill it with generated (by my plugin) data.

Any suggestion would be great. I am not new to JS Scripting, but not that experienced yet :(
B
44
S
10
G
8
Posts: 437
Reputation: 6,463

Post » Wed Jun 11, 2014 3:46 pm

okay, have not seen the forest because of all the trees.

I think I found it myself now.
B
44
S
10
G
8
Posts: 437
Reputation: 6,463

Post » Wed Jun 11, 2014 4:13 pm

You might reference this
B
108
S
26
G
259
Posts: 4,430
Reputation: 145,679

Post » Thu Jun 12, 2014 7:14 am

rexrainbow wrote:You might reference this


Yes, that is how I am doing it right now :)

Thank you very much
B
44
S
10
G
8
Posts: 437
Reputation: 6,463


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests