Create account / Log in

Cannot add Global Property to Map-level Item?

Talk about module design ideas and techniques.

Moderators: Tim M, uckelman

Cannot add Global Property to Map-level Item?

Postby Rommel14 » July 2nd, 2011, 1:38 am

Hello again!

I've run into a conundrum, and I need some clarification. In the Global Properties Wiki page, it says that you can add a Property to a Zone (I can do that), a Module, (I can do that), or a Map. Whenever I select the Map-level item in the editing tree, I get no option to add this in the right-click menu. I have also tried right-clicking on the items above / below this in the hierarchy--still no option in the menu.

On what should I be clicking to add this? Currently, I've had to declare all of my Global Properties under the main "Global Properties" category of the tree which makes them all Module-level items. Having some Map-specific ones could be more helpful in my situation.

On a related note, how strict is the scoping for GPs? If, for instance, I have a GP in one Zone of a Multi-Zone Grid, will a Piece in another Zone of this MZ Grid look for GPs in other Zones of the MZ Grid, or will it only look at the Zone in which it resides? To make the GP in question "visible" to the Piece, I would need (at least) a Map-level GP, right?

Thanks again for all you help, folks!
"For to win 100 victories in 100 battles is not the acme of skill.
To subdue the enemy without fighting is the acme of skill.
Thus, what is of supreme importance in war is to attack the enemy's strategy."
-- Sun Tzu, The Art of War
User avatar
Rommel14
 
Posts: 39
Joined: June 27th, 2011, 12:58 am

Re: Cannot add Global Property to Map-level Item?

Postby DrNostromo » July 2nd, 2011, 2:43 am

There should be a "Global Properties" option in the map window tree by default. Are you missing yours?

On a related note, how strict is the scoping for GPs? If, for instance, I have a GP in one Zone of a Multi-Zone Grid, will a Piece in another Zone of this MZ Grid look for GPs in other Zones of the MZ Grid, or will it only look at the Zone in which it resides?


I haven't worked a lot with zone or map specific GP's but I believe it would only view the GP in it's current zone ...or global ones, of course.

To make the GP in question "visible" to the Piece, I would need (at least) a Map-level GP, right?


Not necessarily. You could use property filters pointing to a GP in another zone.
User avatar
DrNostromo
 
Posts: 1036
Joined: December 21st, 2007, 3:54 am
Location: Wine Country, Cal. USA

Re: Cannot add Global Property to Map-level Item?

Postby Rommel14 » July 3rd, 2011, 2:14 am

DrNostromo,

:oops: :roll:

Uh, yeah, it's there. Sorry for the false alarm. I was so entranced by the concept of attaching GP to Zones, I kept looking for this in a right-click menu rather than as an existing branch in the Map tree.

As for the MG Zone scoping, that makes sense. Just paranoid, I guess. Too many times, I've spent 1-2 hours coding, only to find that my brilliant concept doesn't work because two pieces / variables can't see / interact with each other.

Regarding your comment about the property filters, can you give me a hypothetical example? Are you referring to the type of situation you can create in a Deck GKC where the key command only affects a piece that meets the condition defined by the trigger in the GKC? Or are you thinking of something else? I don't mean to be dense, but again, I don't want to assume that I'm on the right track.

You're da man, Dr! Thanks for your helpful replies!
"For to win 100 victories in 100 battles is not the acme of skill.
To subdue the enemy without fighting is the acme of skill.
Thus, what is of supreme importance in war is to attack the enemy's strategy."
-- Sun Tzu, The Art of War
User avatar
Rommel14
 
Posts: 39
Joined: June 27th, 2011, 12:58 am

Re: Cannot add Global Property to Map-level Item?

Postby DrNostromo » July 3rd, 2011, 2:31 am

For example, you can set up a Global Property used for quick temporary values. Let's call it ValueTemp.

Your piece can then have a Set Global Property trait to adjust ValueTemp. In the "Locate Property starting in..." box, you can select a named zone. Let's say the GP specifically in the named zone is Strength. You can then set a key to "Set value directly" to $Strength$.

If you want the piece to maintain this value, follow it up with a Dynamic Property called something like PieceStrength and have that value set to $ValueTemp$.
User avatar
DrNostromo
 
Posts: 1036
Joined: December 21st, 2007, 3:54 am
Location: Wine Country, Cal. USA

Re: Cannot add Global Property to Map-level Item?

Postby Rommel14 » July 4th, 2011, 4:01 am

DrNostromo,

Wow...you're giving me all KINDS of ideas about how to improve my coding. Not that I was any kind of a whiz at this previously. :wink:

Thanks again for your excellent explanations!
Rommel14
"For to win 100 victories in 100 battles is not the acme of skill.
To subdue the enemy without fighting is the acme of skill.
Thus, what is of supreme importance in war is to attack the enemy's strategy."
-- Sun Tzu, The Art of War
User avatar
Rommel14
 
Posts: 39
Joined: June 27th, 2011, 12:58 am


Return to Module Design

Who is online

Users browsing this forum: No registered users and 0 guests

cron