Help: Freeform drag and drop, states appear to change but don't?
Hi, thank you for taking the time to read this and hopefully this makes sense:
I have a free form drag and drop question that has 10 items that can be dragged into 2 areas, one should change its state to drop_correct the other drop_incorrect.
I wanted to add a layer that appears if the user tries to submit the answer before moving all 10 items, I set a trigger to check if any of the 10 objects are equal to normal: (using the or statement condition) if any are set to normal this layer will appear (telling the user to drop all 10 items before submitting), the theory behind this was that when an item is dropped it's state is changed to either drop_correct or drop_incorrect.
I also had a trigger tied to the submit button that checks that all 10 items do NOT equal state normal (if any are normal the question will not submit)
This has never worked, to make this simpler let’s stick with 1 object (rather than 10)
(note: I have unchecked the delay state change option in drag and drop options)
I’ve made sure the item has a normal, drop_correct, and drop_incorrect state (I made each state distinct so I know if the state is changing for testing purposes).
So when an item is dropped into the correct drop area the physical appearance of the item changes to the drop_correct state, but the question will not submit and the layer telling the learner to drop all the option still appears.
So to troubleshoot this I made a Boolean variable (default: false) and had a button set it to true if the state of the item is normal and a separate button that checks if it’s NOT normal and sets the variable to false.
Beforehand I test the first button to check if the status is normal (this will successfully change the variable from default: false to true), I will then test the second button (checking for not normal) and the boolean doesn't change (good the buttons work as i expected), Now after you drop the item into either drop zone, the appearance will change to drop_correct (or incorrect), the second button when pressed will now change the boolean to false (great, the second button works for sure), but i did press the first button again and it still changes the variable to true (indicating the items state is normal, but the other button will now also change it to false (indicating the item is NOT at state normal), both buttons work and the system thinks this item has both states? The layer telling the user to drop all items still appears and the submit button wont pass the NOT normal condition.
What’s going on?
Basically what I want to achieve is to prevent the user submitting the answer before all 10 items have been dropped, the user can drop any item in any order (all 10 items are visible from the start), they can move items between the two drop zones as often as they wish (the items will not be disabled). Then when they do finally submit a valid answer a new layer will appear highlighting in both green and red each item (duplicates on a different layer) showing which ones they got correct and which are incorrect (at this point it detects that drop_correct state (and incorrect) and changes the items colour perfectly fine).
My original attemp was to just do a check to make sure none of the 10 items have state normal and if any of them have states normal interrupt the submit button.
I believe I have over complicated this as there must be a reason why the states don’t change on a system level but they do change to the appropriate states appearance?
Thanks again for your time