Home › Forums › General Questions › a little logic hint / help needed
- This topic has 6 replies, 3 voices, and was last updated 4 months ago by
visualizer.
-
AuthorPosts
-
2025-07-06 at 6:28 pm #82766
visualizerCustomerHi
here is a simple scene made with 4 cubes..
how do I set up a condition that, user must click cubes in sequence only.
Initially 1st then 2nd then 3rd & then 4th
if user clicks 2, 3 & 4 before clicking 1st then it should pop up an error message
Then second time user needs to click 2nd cube & if 1, 3 & 4 are clicked then it should pop up the error message
same with 3rd & 4th.
how to setup a logic?-
This topic was modified 4 months, 1 week ago by
visualizer.
Attachments:
2025-07-06 at 6:56 pm #82769
visualizerCustomerI have set up a simple puzzles as seen here… for first box it plays well
but the error sound doesn’t play in both the logic puzzles….
whats wrong?If this stage gets resolved there is as second stage to set but I am wondering how to pass this stage?
-
This reply was modified 4 months, 1 week ago by
visualizer.
Attachments:
2025-07-07 at 6:17 am #82785
Alexander KovelenovStaffHi,
You might employ the following approach:
1. Create a list of all 4 objects
2. Create an index variable that will take the following values: 0, 1, 2, 3 (from object 1 to 4)
3. Upon clicking on the object, find it in the list (returns position)
4. Compare position with index. index = postion is OK, index ≠ position is an error
5. Increase index if no error happened on the previous step
6. If the index > 3, set it back to 0 (to repeat the clicking cycle)Hope this helps!
2025-07-07 at 2:07 pm #82828
visualizerCustomeroh ok
Do we have any example in our asset store on this?2025-07-07 at 5:03 pm #82833
Alexander KovelenovStaffWe don’t, but the logic can be implemented quite easily. If you’ll have difficulties just output the content of the variables to the browser console with the print to console puzzle.
2025-07-09 at 8:50 am #82858kdv
Participant2025-07-10 at 6:32 am #82871
visualizerCustomersmth like this will do the job
Oh
will try to make this puzzle setup and understand it. for me its a kind of a homework…:)) learning for me.
Thx kdv /|\ -
This topic was modified 4 months, 1 week ago by
-
AuthorPosts
- You must be logged in to reply to this topic.




