Forum Discussion
Trying to add/subtract from variable based on object state - Need some help
I am challenged trying to get simple math to work with triggers. The goal is to add 1 when the user clicks on an object in the Normal state and subtract when in the Selected state.
I have one trigger to add and another trigger to subtract based on the state of the object.
I can only get one of these triggers to work one at a time. It only adds or only subtracts. I tried switching the sequence, different conditions.
Any thoughts? ( I added a screen shot of the triggers)
- WaltHamiltonSuper Hero
Change "if state of ... is equal Normal" to "if state of ... is not equal Selected.
Selected (like most of us) thinks it is normal, so in a trigger like this, reports that it is normal. Be aware the the switch between Normal and Selected takes place before any of the "When user clicks" triggers happen.
Edit - All the built-in states report that they are Normal.
- JeffGraunke-31bCommunity Member
Thank you!! That worked!!
I had no idea the states work that way.
- WaltHamiltonSuper HeroYou're welcome. PIAWYC (Pass it along when you can).