Get behavior expression and use it into plugin ?

For developers using the Construct 2 Javascript SDK

Post » Sat Sep 24, 2016 11:35 am

Hello,
I search way to get the speed of instance from rex's speed monitor behavior:
http://c2rexplugins.weebly.com/rex_speedmoinitor.html

And then use it into my plugin.

Do you know how can I do this ?

Thanks for your help
B
17
S
10
G
19
Posts: 140
Reputation: 11,457

Post » Sat Sep 24, 2016 12:37 pm

This is deliberately not supported because it is a brittle architecture to depend specifically on plugins or behaviors that may not be there and cannot be interchanged with any other features.

Just find a way to let the user tell your plugin that expression, e.g. through an action.
Scirra Founder
B
402
S
238
G
89
Posts: 24,637
Reputation: 196,071

Post » Fri Sep 30, 2016 2:50 am

@Ashley

Reusing plugins and behaviors had been discussed many times.
An expression through an action plus a condition is a solution, but it is not a good solution if these code should be encapsulated. i.e. it should not be exposured to users, like a private method.

I am not trying put all things into plugins, ACE are necessary to configure plugins, but there still could have another way to make plugins to communicate to each other directly without event sheet. It will make event sheet more clearly.
B
110
S
28
G
280
Posts: 4,488
Reputation: 156,568


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests