Create account / Log in

Global Key Command & Layers

Talk about module design ideas and techniques.

Moderators: uckelman, Tim M

Global Key Command & Layers

Postby Ainulindale » September 2nd, 2012, 9:29 pm

Hi everyone,

I'm trying to design a Global Key Command to toggle a layer of specific pieces.
The pieces all share the same property : canBeToggled = true

I have several layers in several prototypes. In all these prototypes, layers are named the same : "Flag". They contain two named levels : " (White)" and " (Black)", which are suffix.
A given piece only has one instance of a prototype containing a "Flag" layer.

I'm trying to build the matching property of the GKC to Toggle all pieces with white flags with the following : canBeToggled = true && Flag_Name =~ White

It just won't work. Did I miss something?

Thanks
Ainulindale
 
Posts: 29
Joined: July 12th, 2012, 8:17 pm

Re: Global Key Command & Layers

Postby Ainulindale » September 2nd, 2012, 9:37 pm

Slight precision:

I tried with =~, =, with "(White)", " (White)", won't work.
I suppose that the initial space before the level name is problematic.

--
Julien Cassignol
http://www.ainulindale.net
Ainulindale
 
Posts: 29
Joined: July 12th, 2012, 8:17 pm

Re: Global Key Command & Layers

Postby Ainulindale » September 2nd, 2012, 10:07 pm

For the sake of others stumbling on the issue.
The property filter is built by trimming the value (leading and trailing
spaces).
If you're trying to match such a value, then it simply won't work.

In my case, using level worked, as it's numeric.


--
Julien Cassignol
http://www.ainulindale.net
Ainulindale
 
Posts: 29
Joined: July 12th, 2012, 8:17 pm


Return to Module Design

Who is online

Users browsing this forum: No registered users and 3 guests