Forum Discussion

ELOUPEI's avatar
ELOUPEI
Community Member
27 days ago
Solved

Drag and Drop With Feedback Layers BUT NOT Correct or Incorrect

I'm trying to figure out a drag and drop where the user has nine dragable items and seven drop zones. The goal isn't to find the seven correct items of the nine. The user can drag any of the nine in ...
  • JoanneChen's avatar
    22 days ago

    Although ThierryEMMANUEL has figured out a solution, I would still like to try a simpler version without using a tons of triggers.

    I use the built‑in drag‑and‑drop function so that objects can return to the start area when a target is occupied. I also prefer using "state" for counting the TotalPlaced value and rely on two triggers to change the state.


    What the built‑in model cannot change is that when another item is dropped on the same target, the original item still remains in the "placed" state even after returning to its initial position. Since this is the only issue in my solution, I thought—why not use the new AI assistant to solve the problem? Below is the prompt I gave the AI assistant, and it worked as expected. A single JavaScript snippet solved it.

    Change the state of crit# to normal when they moves onto hotspot1 area. For example, change crit9 to normal when it moves onto hotspot1.

    Here is my version3. As Nedim said, I also value discussions like this and gracful learn something from each other. Thank you!