New to Construct 2 but very good with JavaScript

For developers using the Construct 2 Javascript SDK

Post » Sat Mar 01, 2014 4:53 am

Hello, so I just started using construct today because I joined a team that's using it. But I'm quite good at just javascript alone and rather leave as much of the construct overhead to the rest of the team as I can.
So what I'm asking is: are they any limitations to what you can do in the Javascript sdk, like can or how do you access other instances from custom plugin's or behaviours?
What I mean is if I have an instance of say a cat, can I program it's behaviour to detect whether there's a dog with coordinates near it's own?

Also, where do I go to learn more about construct's api: I'm seeing a lot of global functions and methods being called from the "cr" object
B
3
Posts: 1
Reputation: 177

Post » Sat Mar 01, 2014 5:33 am

There are really no limitations except those of javascript, and html.
Above where it says Manual there's the sdk documentation https://www.scirra.com/manual/15/sdk
As far as your detection thing it can done via events using a little system knowledge of "for each", and distance(), or if you must have a behavior the Line of Sight behavior will do the same. Might check that out.
Image ImageImage
B
170
S
50
G
179
Posts: 8,378
Reputation: 113,425

Post » Sat Mar 01, 2014 9:20 am

@spleen387 You may find yourself in a useful situation as there are many API's out there for third party publishing portals that need plugins created in JavaScript.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,603


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests