[messages] Edit: [Module Design] Re: Having a Layer Property Follow Map Property
drnostromo at drnostromo.com
Sun Jul 25 22:03:54 MST 2010
[This message has been edited.]
> I'm making a game where each of the map zones has a Global Property
> called wealth (numeric).
> I have game markers to show which side controls the zone. The control
> markers have a Layer called tax, which I have set to follow the
> property called wealth so they can display the tax rate on the marker.
> However, when the control marker is in the map zone, the layer doesn't
> change to reflect the map property.
> Is something else needed?
You need to have a trigger of some kind to update the value. Try this...
Change the variable name on the layer to something like ZoneWealth.
Include a Dynamic Property trait on the control marker to set the
variable ZoneWealth to equal the variable Wealth in the Named Zone
$CurrentZone$. Set it to trigger on a key command.
Then set some way for this key command to trigger when the control
marker in placed in the zone.
When the trigger is set off, the ZoneWealth will be updated to equal the
Wealth of the Current Zone and the layer will display the new value.
I just did this off the top of my head without testing it but I think it
Read this topic online here:
More information about the messages