You are not a PITA. It’s okay.
You should two new button pieces. Keep them. Edit one. Discard the delete trait, the warning/error dynamic property, and both triggers. Edit the basic piece trait at the top. Add there the “on” image of the switch.
Edit the set global property trait for Setup1_enabled. Change the command from “disable” to toggle. On the far right, change the value field from false to Setup1_enabled==false. It will be enclosed in curly braces. This means if the toggle command is issued, Setup1_enabled will change from true to false or false to true. (Side note to me: I hope this test results in a true or false result.)
Edit the layer trait. Set the “always active” checkbox to off. Change the activate command from ^A (I think that’s what it is) to toggle, which goes to the immediate left of the control code. You can remove the “Activate” text string, or change it to maybe “Toggle.” Finally, add an image to this layer trait. Add the “off” image of the switch.
Edit the action button. Change the command it executes to toggle.
Do the same thing for your other car and Setup2_enabled.
Let me know how it goes. If it doesn’t work, tell me what’s wrong, and I will help you debug it.
March 14 |
Thank you again Shilinski, you are so patient…
I have tried it and it didn´t work so well…
But on a second thought, in this way, making the setup of a car is going to be too rigid. If a player sets up its car with a right sum and presses the button he cannot go back in its decision. Also the game rules are a “work in progress”; maybe there could be optional rules where the car set-up points will be variable.
I would prefer a more flexible solution where I could have some kind of a switch button that could go “On” and “Off”, In the “On” mode the player could change the car set up and in the “Off” mode not.
My intention is not really to forbid the players to change the gauges; only to preclude them to change inadvertently. That’s why, at the beginning I have chosen to select each gauges only with a shift+click command. But you made me much more ambitious; in this way, if a single piece controls all the changing set-up, it would be much more ellegant.
I thought that perhaps I could make it with a “Replace with other” trait. There would be a “On” piece that would have the global property that would allow all the gauges to be changed and with a menu command to replace that piece with another (the “Off” piece) that would forbid (probably with a global property also) that the gauges would be altered; it would also have a command to replace it with the “On” piece, if desired.
I have already created another global property as you told me in 1 (its named “Setup1_enabled” and not just “Setup_enabled” because I have two cars in each map window).
And I have edited all the restricted commands for each prototype piece-gauges as you told me in 2
I have made images for the switch between “on” and “off” for the two pieces that would be replaced (switched) from one another.
But, alas, my ignorance doesn’t alow me to set a proper global property in each piece with the adequate command (i.e enabling changing the gauges with the “on” piece and disabling it with the “off” piece).
Would you still have some patience left to keep instructing me? I really feel that I am beginnig to be a “pain in the ass”.
I can always go back to my first basic solution of just selecting the gauges with shift+left click, as you have already found the solutions to the real problems with the sums which were really impossible to solve without your help and knowledge, and really simplify the car set-up.
Thank you so much again…