I am attempting to create a module in which pieces have variable layer settings.
In one case, airships have different elevations which can change during play (elevation can be 1 through 3). I would like the uppermost airships to be drawn on top of the lower ships.
In another case, I am wanting to use calculated properties to determine if a piece (airship component) belongs to the selected (active) ship. I already have the selection buttons working. If the piece belongs, the property is “Active”, otherwise it is “None”. I would then use this property (along with a Game Piece Layer Control) to hide from view any pieces that were “None”. This is basically used so that I can have a single Map window that shows details for the currently selected ship. Since the number (and name, type, make-up, etc) of ships are not already known, I can’t just predetermine all the Layers.
However, in practice, I find that changing the Calculated Property does not change the apparent Game Piece Layer of the piece. I.e. All pieces are added to the component screen while no ship is selected (all have cActive=“None”). After selecting a ship (and having the Calculated Property ‘cActive’ change value to “Active”, as verified using a visible label), hiding “None” pieces hides everything.
Interestingly, I find that if I change some other property in the piece, any status changes will actually carry over to Game Piece Layers, and the piece may be hidden properly. However, if the piece is later revealed and deleted, it will leave behind an undeletable shadow (that seems to always be “None”). I can also not get the changed piece back behave as if it’s “None” (the change is one-way).
Anyone have any idea what’s going on? Or how to get variable Game Piece Level assignments to work? I have not tested elevation stuff out yet, but expect the outcome would be the same.
Steps to repeat issue with attached file:
- Start new game.
- Show ‘Pieces’ and ‘Ship Selection’ windows.
- Copy ‘Stat-Title’ piece from Pieces->Other to somewhere on HML Raven (in Ship Selection window). Copy any other pieces you want from Pieces->Slots or Pieces->Other to HML Raven.
- On HML Raven, right-click ‘Load Ship’ button and select ‘Load Ship’. Ship will appear on map, and all components will be copied to ‘Active Ship’ window (assigned to HML Raven).
- Add or delete components from HML Raven window as desired, but leave the ‘Stat-Title’ piece.
- Right-click ‘Stat-Title’ piece and select ‘Change Ship Name’. Rename ship whatever you want.
- Repeat step 4. New ship will be placed on map (probably over HMLRaven…but just drag is elsewhere).
- Note that all components have “None” shown in green.
- Click on center of either ship. Log should show that ship was selected, and green label on all associated equipment should change to say “Active”.
- Click ‘Hide Inactive’ button on ‘ActiveShip’ map a few times. Notice how both “Active” and “None” pieces disappear together.
- When one ship is selected, choose an “Active” component, and change something…“Class” on Stat-Title, ‘Destroy’ (not delete) a component, etc.
- Click ‘Hide Inactive’ and notice that some “Active” pieces now remain instead of disappearing.
- Try deleting an “Active” component. Notice that a shadow appears (always acting as if “None”, even if the label says “Active”). Notice that this shadow piece cannot be deleted, and acts like it is on the Pieces area.