Limited rotation

I was noodling around with what would be a minis module, and:

A unit can turn as part of it’s move. Okay, rotation trait, then move straight forward a fixed distance, order the layers correctly, fine.

But… the unit should be able turn however far the user wants (the point of going gridless). Okay, allow arbitrary rotations.

But… the unit has a limit on how much it can rotate at one time (say, 60 degrees). I don’t see any way to have arbitrary rotations with a limit.

Is there any way to do that? Let the user rotate a unit as much as he wants, up to a set limit?

Not that I know of. You might have better luck defining an arbitrary number of facings, like 360, and include commands to rotate x degrees that actually rotates x facings.

The only thing I can think of is to set up a Trigger Action to be fired when the player wants to rotate the piece (instead of letting them trigger the rotation directly from a menu command). This Trigger Action would then save the current rotation (available as the property _Degrees) to a Dynamic Property, trigger the actual Rotate action, then check the new rotation against the saved rotation. If more than 60 degrees difference, display an error message (using the Alert() function), and trigger the Rotate action again. (Note that there is no way to programmatically set the rotation angle if you are allowing arbitrary rotations.) This is quite complicated to set up.

If you don’t need the player to be able to drag the counter to rotate it, you could instead follow Benkyo’s suggestion and define 360 facings, and prompt the user for the new facing with a Dynamic Property, then adjust the input value to be no more than 60 degrees off, and trigger the Rotate CW or Rotate CCW commands enough times to get to the new facing. (Note that in this case, the property holding the current rotation value is _Facing, instead.) This is also quite complicated, and probably not very user-friendly.

Oog. Yeah, both of those sound nightmarish from a user perspective. I mean, I’d certainly refuse to use that.

The entire idea of the user dragging the rotation is so they can see it and say ‘yeah, that looks good’. Pre-knowing that ‘I want exactly 23 degrees’ just isn’t going to happen. Punishing you (with the error) for going over a limit you can’t see is just horrible on the face of it, never mind the setup problem.

I know there’s a few minis-based modules out there, so I’m really surprised this hasn’t come up before.