We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

help with „Lists“

Home Forums Puzzles help with „Lists“

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #22750
    alfredalfred
    Licensee

    Hallo Verge Team,

    https://cdn.soft8soft.com/AROAJSY2GOEHMOFUVPIOE:5a4e9f7c1d/applications/Lotto_01/Lotto_01.html

    i need a little help with „Lists“
    In my app i build this construction to lift a ball from a bowl.
    All balls are in a List called „balliste“

    But how can I edit (detect) the ball that was lifted up?
    How can i get the name of this ball in the List?

    ideas would be very welcome!
    Thanks for help :) :bye:

    puzzle in the screenshot does not the job… :wacko:

    Attachments:
    You must be logged in to view attached files.
    #22761
    Yuri KovelenovYuri Kovelenov
    Developer

    Hi,

    you can use the find puzzle to get the index position of an object in the list:

    https://www.soft8soft.com/docs/manual/en/puzzles/Lists.html#find

    then just get the item by using that index:

    https://www.soft8soft.com/docs/manual/en/puzzles/Lists.html#get_remove

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #22792
    alfredalfred
    Licensee

    Hello Yuri,

    i think its not so easy, because the ball that is lifted up with the yellow stick is always random. (and i dont know its name)
    The only thing i know about the lifted ball is, that its Z-Value is bigger than 3. Its Z-Value is the biggest in the list.
    To find its position in List, there should be
    a function that finds the ball with the highest z-value in the list.

    Is this possible with puzzles?
    :scratch:

    puzzle in the screenshot does not the job…

    Attachments:
    You must be logged in to view attached files.
    #22808
    Yuri KovelenovYuri Kovelenov
    Developer

    I see, you need to find an element in a list with the biggest Z-value. Then you can use the for each puzzle, and loop through your list elements, comparing the Z-value of each element with the previously found Z-value stored in a variable. If Z-value is higher then you save it to that variable (and also save the index of an element to another variable) and continue looping and comparing until the end of the list. In the end, the value of the second “index” variable will be the result you are looking for.

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #22819
    alfredalfred
    Licensee

    hi yuri,
    this sounds like a puzzle adventure. ;-)
    next weekend is perfect to go this way.
    i will keep you up-todate.
    thanks for the advice.
    :bye:

    #22844
    Yuri KovelenovYuri Kovelenov
    Developer

    sure, let us know how it goes!

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #22932
    alfredalfred
    Licensee

    hi Yuri,

    think i need a little more help.
    I tried puzzle construction as you can see in attachment

    list “big-list” generates the list of the z-values.
    list “ascending” should find the highest z-value, but it doesn’t work!

    How can i improve my puzzles?
    someone could put together a puzzle and take a screenshot?
    That would be great :)
    the whole community could benefit from it :yes:

    does it help if i upload the app?

    Attachments:
    You must be logged in to view attached files.
    #22948
    Yuri KovelenovYuri Kovelenov
    Developer

    Hi,

    the find puzzle can only get the position index of the element. It cannot compare it with some other value on the fly.

    But you can compare each element with some value in the loop.

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #23619
    GlifTekGlifTek
    Licensee

    what’s a z-value?
    like in the blender vertical… or CSS z-index?
    curious
    very cool powerball machine!

    #23630
    Yuri KovelenovYuri Kovelenov
    Developer

    I guess Alfred was talking about world z-coordinate (yes, vertical axis in Blender) :)

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.