Question about properties in IDE...

For developers using the Construct 2 Javascript SDK

Post » Sun May 04, 2014 10:41 pm

I'm trying to figure out how to do one of two things. All of this is in the IDE:

1. Have a property I can gray out or disable user input to depending on the setting of another property.

2. Have a property that only appears when another property is set a certain way.

Either option would work for me. I've looked thru other plugins, the sdk documentation, and the forum, but I can't figure out how to do this.

It's not a mandatory thing for my plugin to work, but it would make one of my properties a little more elegant to set for the user.
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Mon May 05, 2014 1:38 am

For part one, use a flag variable. Such as:

if (touchControls are activated) {
set flag variable to true to true
}

if (flag variable = true) {
activate option
}

The same could be used for the second part of your question,

if property is true (your option is enabled), then spawn object (your option button you want hidden) at x,y area.
Kurieus
Come visit and play Blast Box!
B
15
S
3
Posts: 205
Reputation: 1,349

Post » Mon May 05, 2014 8:29 am

@mepis

Thanks for the reply; however, that's not what I'm trying to do.

I'm wonder if there is any way to affect how a property displays in the IDE properties bar; to either grey out, lock, or hide a property depending on the settings of another property. Example:

Properties bar:

1-Activate Foobar on: Single Click/Double Click/Custom Button

2-Custom Button: a/b/c/etc...

The idea would be to hide/lock/grey out the Custom Button property if Activate Foobar is not set to Custom Button.

Hope that makes a bit more sense. :)
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Mon May 05, 2014 11:30 am

Ahh... yes. Sorry. I completely misunderstood you. That, I'm not going to be able to help with. Sorry!
Kurieus
Come visit and play Blast Box!
B
15
S
3
Posts: 205
Reputation: 1,349

Post » Tue May 06, 2014 3:39 am

@TiAm

The control of IDE by SDK was very limited, all your requests could not be done today.
B
108
S
26
G
271
Posts: 4,471
Reputation: 151,777

Post » Tue May 06, 2014 7:48 pm

@rexrainbow

Okay, nice to know for sure. I can work around it. Thanks rex. ;)
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests