Physics behaviour in Python ScriptEditor(Construct r1.2)

For questions about using Classic.

Post » Wed Jun 01, 2011 5:25 pm

Hi,
I'm new to Construct and using Construct r1.2.
I have 2 instances of Wheel object with Physics behaviour and 1 instance of Body object with Physics too, and here is what i want to do:
1- I want to change the torque of one wheel from a Python script.
2- I want to create a hinge between a wheel and the body from a Python script too.

In the script editor only "Wheel" is detected. I found on the Wiki that i should write ObjectnameBehaviourname. What should i write to access the Physics behaviour or any other behaviour in general?

Note: using the UI of the event sheet it works fine for me but i want to use Python scripting

EDIT:
i found this tool that gives the correct syntax [url:1rlrrvbc]http://www.scirra.com/forum/viewtopic.php?f=16&t=6158&start=0&hilit=pyshell[/url:1rlrrvbc]
it is very useful!
So i have to write: WheelPhysics[index].HingeToObject(...)
But i wonder, why the scripteditor does not detect such syntax?? does it need a fix?
B
1
G
1
Posts: 1
Reputation: 427

Post » Thu Jun 02, 2011 12:28 am

[quote="Imed":2aepy3ym]But i wonder, why the scripteditor does not detect such syntax?? does it need a fix?[/quote:2aepy3ym]
Yes, a fix is definitely needed. Python integration has gotten a lot better in the last few releases pretty much all due to ROJOhound, but yes it could be better.
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Thu Jun 02, 2011 10:59 am

I agree the script editor could use some improvement in that area. Ideally the editor should show everything that is available at runtime. This will be attention eventually, but there's a few other issues that merit a higher priority at this time.
B
79
S
24
G
52
Posts: 4,724
Reputation: 39,711


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest