Has wall to right.

For questions about using Classic.

Post » Mon Sep 20, 2010 4:57 am

Hey all,

How do I access the "Has wall to right" condition (part of the Platform behavior) in a Python script? What is it called in the script editor?

Any help would be greatly appreciated. :P

-Zumbooruk
B
2
G
2
Posts: 10
Reputation: 670

Post » Mon Sep 20, 2010 4:35 pm

If it's any help, "overlapping at offset" is the same thing.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Mon Sep 20, 2010 6:17 pm

It's not listed in the script editor, but it's:
[code:1quy64uv]SpritePlatform.WallRight()[/code:1quy64uv]
B
79
S
24
G
54
Posts: 4,746
Reputation: 40,755

Post » Mon Sep 20, 2010 7:59 pm

Thanks, R0J0hound! You're my savior yet again. :D

How did you know what it is? Is there a list somewhere which shows the Python equivalencies of all of the conditions and actions available on the event sheet? I often seem to run into the problem of knowing how to build something using the event sheet GUI but not knowing how to access the same properties, actions, etc. in a Python script. The Wiki is not very helpful in this regard.
B
2
G
2
Posts: 10
Reputation: 670

Post » Mon Sep 20, 2010 8:18 pm

I used PyShell. It allows you to explore python in construct much like the python command line app bundled with python.

Open PyShell.cap, add a Sprite and give it the Platform behavior.
Run the Layout and you will be presented with a prompt.
If you type dir() you will see a list that contains the names of all the objects.
dir(SpritePlatform) shows a list of all the python equivalences.
B
79
S
24
G
54
Posts: 4,746
Reputation: 40,755


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests