[Plugin] FunctionExt

Post your completed addons to share with the community

Post » Fri Apr 12, 2013 4:24 am

@MelonGuns

Capx: inject a function object

Remember user should NOT to put ";" at the last character. The code string at action of inject function objects has the same issue.

The format of injected function code in acton: inject a function object is
[code]"function(fn, params)
{
....
}"[/code]

The "action: inject function objects" might be more useful then "action: inject a function object", since previous one could run some initialize code before injecting.rexrainbow2013-04-12 04:33:25
B
97
S
22
G
177
Posts: 4,111
Reputation: 103,525

Post » Sat May 18, 2013 4:01 am

Update

Support official save/load. It will inject code again when loading.
B
97
S
22
G
177
Posts: 4,111
Reputation: 103,525

Post » Sat Jun 22, 2013 4:17 pm

@rexrainbow Can I use this plugin to call and external JS library that is used for USB communication? I want to be able to control some motors from Construct. It is working with web browser using this library.
Thanks, and sorry for the lame question, I don;t know javascript but I want to learn it.
B
64
S
15
G
20
Posts: 469
Reputation: 16,027

Post » Sun Jun 23, 2013 12:46 am

@Cipriux

You might try this FunctionExt plugin or Call Javascript plugin.
B
97
S
22
G
177
Posts: 4,111
Reputation: 103,525

Post » Sun Jun 23, 2013 1:14 am

Thank you for confirm it .Bright sun is rising on my street:)
B
64
S
15
G
20
Posts: 469
Reputation: 16,027

Post » Sun Jun 23, 2013 7:19 am

@Cipriux

The best way to have usb communication in C2 is to create an usb communication plugin. Could you provide the api of usb communication?rexrainbow2013-06-23 07:20:23
B
97
S
22
G
177
Posts: 4,111
Reputation: 103,525

Post » Sun Jun 23, 2013 2:02 pm

This is not the library I was using, but is the same thing
chrome.usb
I am thinking of testing it using my USB mouse, in theory it should work without using Mouse or Touch plugin. For the moment my PicMicro motor controller is not working, but after I see Construct can be used to communicate to USB I'l be taking the next step.
My final goal is to use Construct not only as a game environment...but also as a brain for a small robot, where I use my Android phone for decision making
I know visual processing is alot complicated, but for things like 3d accelerometer Construct makes it really easy for me.
For the moment I am unable to build my own JS plugin but I plan to get started after I finish my current game project.
Can you give me a simple example of how to use your plugin to capture mouse movements for example with the above lib? (for now all is chinese language to me)
Thanks,
B
64
S
15
G
20
Posts: 469
Reputation: 16,027

Post » Sun Jun 23, 2013 4:05 pm

@Cipriux

I will read them. It will take some days. I'm not sure what can I do.
Anyway, thanks for this information.
B
97
S
22
G
177
Posts: 4,111
Reputation: 103,525

Post » Sun Jun 23, 2013 4:30 pm

@rexrainbow
I think it will be great is someone will develop a plugin for USB, similar to Gamepad but with the possibility of mapping specific commands, that way you cam make specific mapping for different USB controllers and devices. I know Gamepad plugin is best suited for Xbox controllers and from what Ashley say about it, firefix and chrome interpret the commands from the same controller differently.
An ideal way will be to have user defined commands in and out(out for vibration). I know is difficult because of the specific driver configurations, but is just a thought.
Thanks for you interest in that !
B
64
S
15
G
20
Posts: 469
Reputation: 16,027

Previous

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 3 guests