In the Dynamic Property properties box, if you tick the ‘Is Numeric’ checkbox, then you get the option to enter a minimum and a maximum value. Set the Minimum to 1, the maximum to 4 and leave the ‘Wrap?’ checkbox unchecked. Players will not be able to change the value of the property outside of the 1-4 range using the Gain Step and Lose Step commands.
Yes, but what I want to do is disallow “gain step” command when the block is at full strenght.
Piece has also a trait “report action” that triggers on CTRL+ or CTRL-
If I press “CTRL+”, of course the piece does not get a 5th step, it stays at 4. But nevertheless I get a report “Block gains one step”. It is a hidden block, it might not be that bad, so the opponent cannot know if it actually gains or not a step.
I would want to avoid this.
I know how to use Restrict Command to disable certain commands if a piece is in a certain map or zone of the map for example, but:
how should I go to disable commands if Piece Layer is #4 or #1?
Bonus question, could I restrict “Gain Step” command if Piece Layer is “maximum”? there are blocks with a maximum of 1,3 and 4 steps, so “maximum” would be different for each one. If I somehow can write an expression
Restrict when properties match: “piece has maximum steps”
I could put this in the prototype for every block.
Also, as I have blocks with different maximum number of steps I gave each of them a marker trait, MaxSteps=# (where # is the maximum number of steps for that block).
Then in prototype for all blocks, I restricted “gain Step” when Steps_Level=$MaxSteps$, and voilà!!