Pushing a piece with another piece

I am about to finish the last details of a improved version of robo rally. I managed to get the robots moving by activating the program cards. The only problem is when it is supposed to push another robot. how do you move the robot that is being pushed?
I have a grid active on that map, Don’t know if that might help.

I would expect that you just have the players move the pushed robot.
Pretty much the way you do it on the board, since the miniatures don’t
can’t really push the way counters might…

On Tue, Aug 28, 2012 at 8:15 AM, Mithrandir souron@mail.be wrote:

I am about to finish the last details of a improved version of robo
rally. I managed to get the robots moving by activating the program
cards. The only problem is when it is supposed to push another robot.
how do you move the robot that is being pushed?
I have a grid active on that map, Don’t know if that might help.

_____________**
Read this topic online here:
vassalengine.org/**forum/vie … 2#**p35832<https://forum.vassalengine.org/t/pushing-a-piece-with-another-piece/5231/1
_____________**
messages mailing list
messages@vassalengine.org
vassalengine.org/**mailman/listinfo/messageshttp://www.vassalengine.org/mailman/listinfo/messages

Global Key Commands, Send to Location and/or Move Fixed Distance are your friends. Triggers are also a must.

I know that the key lies in having the right trigger. basically I don’t know how to write “If another is on top trigger push alarm”. Since move fixed distance can not be relied upon as the robot pieces can rotate. If you have it move a fixed distance when it is pointed in another direction it will move according it rotated position. For example if it needs to go down, you send go back signal and the robot is pointed left it will move right instead of down. You would need to say move from location 1 to location 2. For that you need to calculate location 1 and 2. Location 1 being the start location of the robot being pushed. Location 2 the tile that is 1 tile away form location 1 away from the direction the pushing robot came from. As you can see it would be a complicated process. It is not that I am afraid of complicated it is more that I don’t have enough knowledge on the programming language that is required to build this feat.

  1. Give each square/tile an unique name (e.g. 1, 2, 3 etc).
  2. Have some global properties store the name of illegal moves (e.g. 1to3=wall, 2to5=barrier etc).
  3. Add some trait in the robot prototype to calculate CurrentTile (which should be a dp or gp).
  4. Store the current tile of each robot in some global properties like Robot1Tile, Robot2Tile etc.
  5. Add some trait to calculate TargetTile (again a dp or gp) for a robot in a given CurrentTile receiving a push UP/DOWN/LEFT/RIGHT command, paying attention to the value of its _Degrees property.
  6. Check if the move is legal (e.g. check $CurrentTile$to$TargetTile$ value if set) and report error otherwise (“Wall!”, “Barrier!”).
  7. If no error, check TargetTile vs all other robots current tiles (Robot2Tile, Robot3Tile etc).
    8 ) If you get a match, issue a global key command on the matching robot to ask him to move up/down/right/left first, if possible… (repeat steps 5 to 8 ).
  8. Execute the actual move - when legal - via a send to location (assuming you have a grid with regions having the exact same name you gave to the tiles) or via the appropriate move fixed distance command.