Create account / Log in

Automatic GamePiece Orientation

Topics related to the main Vassal engine.

Moderators: Tim M, uckelman

Automatic GamePiece Orientation

Postby rookiebatman » November 6th, 2015, 5:45 pm

Is there a way to set up a board so that a Game Piece which goes into a certain area will be given a specific orientation (rotate in a certain direction)?
rookiebatman
 
Posts: 14
Joined: July 18th, 2014, 11:41 pm

Re: Automatic GamePiece Orientation

Postby Tim M » November 6th, 2015, 5:56 pm

Give the piece a trigger action trait that only executes once based on board location when placed i.e with a property match expression such as hasSetup = false && CurrentBoard = something. Then you add the relevant traits to rotate as reqd and add a dynamic property that will flip the hasSetup variable to true all the keystrokes will be contained in the trigger action
Tim,
Vassal Uber Geek/Guru

Problems? post your OS, Physical Mem, version of Vassal and Java plus the Module in question.
No developer can help with out that info, thx!
User avatar
Tim M
 
Posts: 1799
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Re: Automatic GamePiece Orientation

Postby rookiebatman » November 7th, 2015, 11:55 pm

I'm sorry, but can you put this in more novice terms for me? Let's say for the purpose of discussion, I want a piece to face north whenever it's in "Area 3." I can't just set it to trigger a certain number of rotation keystrokes, because I don't know how it's gonna be rotated before it enters Area 3. Now, I have seen some indications from other attempts to research this problem that there's an "unrotate" command, to return a piece to its original facing, but I can't find out where that command actually is (I don't see it anywhere in the Can Rotate trait). If I could find that command, then it would allow me to set the piece to unrotate first, and then I'd be able to rotate it a fixed amount, because I would no longer have to worry about not knowing how it was oriented before it moved into that area.

Also, can you explain what hasSetup is?
rookiebatman
 
Posts: 14
Joined: July 18th, 2014, 11:41 pm

Re: Automatic GamePiece Orientation

Postby doughnutbranch424 » October 4th, 2016, 7:03 am

Tim M wrote:Give the piece a trigger action trait that only executes once based on board location when placed i.e with a property match expression such as hasSetup = false && CurrentBoard = something. Then you add the relevant traits to rotate as reqd and add a dynamic property that will flip the hasSetup variable to true all the keystrokes will be contained in the trigger action

Thanks
doughnutbranch424
 
Posts: 1
Joined: October 4th, 2016, 7:02 am


Return to General Discussion

Who is online

Users browsing this forum: Bing [Bot] and 3 guests