Create account / Log in

GKC Sendto CurrentX +800 sometimes stacks, why?

Talk about module design ideas and techniques.

Moderators: Tim M, uckelman

GKC Sendto CurrentX +800 sometimes stacks, why?

Postby Benkyo » August 27th, 2019, 6:03 am

In my module, I have a button that sends a global key command that causes a set of pieces to all be sent to CurrentX, CurrentY, with the "advanced" option of +800 pixels to X. It's a row of cards and the intent is that they all get moved along by one card width, to make room for another card.

For unrelated reasons, these cards must not have the Do Not Stack trait, and the window on which this command is used does require stacking to be possible.

99 times out of 100 this works fine, but every now and again two cards that started off adjacent to each other end up stacked after the button is used.

Bizarrely, if undo is clicked and the button pressed again to repeat the Send To, this time the cards move as expected and do not end up stacked.

I don't know whether or not it is related, but there are some complicating factors - the area is divided into 12 zones, the button first sets 12 global properties associated with those zones to 0, then sends a global key command to the cards so that each card in a zone sets the associated global property to 1, THEN sends a global key command to a control piece with triggers to send the global key command that actually moves the cards only when the global properties match certain simple patterns (for example, if zone 12 is occupied, the command is not sent).

The reason I'm using Send To CurrentX +800 is to avoid the mess of reports that occur when a Move fixed distance +800 trait is used.

Does anyone know why the very infrequent stacking of cards (that isn't repeated after an undo) might be occurring?
Benkyo
 
Posts: 128
Joined: March 13th, 2013, 11:02 pm

Return to Module Design

Who is online

Users browsing this forum: MSN [Bot] and 1 guest