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.

Loops – is “i” necessary or just a name for individual object in group?

Home Forums Puzzles Loops – is “i” necessary or just a name for individual object in group?

  • This topic has 39 replies, 2 voices, and was last updated 1 month ago by c4cc.
Viewing 15 posts - 1 through 15 (of 40 total)
  • Author
    Posts
  • #71386
    c4cc
    Participant

    For example:

    https://www.soft8soft.com/docs/files/puzzles/puzzles-loops-for-each-example.jpg

    Is “i” actually required to get the loop running through list, or can you put another name like “target”?

    #71388
    kdv
    Participant

    You can rename “i” as you wish. It’s a local variable that is visible and working only inside a loop.

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

    #71389
    c4cc
    Participant

    Thanks, btw, can you help me here please? It’s a loop through a clone list, each clone assigned a dict.

    #71390
    kdv
    Participant

    Create a simplified app, attach it here and in this case it will be possible to find out what you want.

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

    #71392
    c4cc
    Participant

    The link i mentioned earlier explained what I needed:

    Loop clones for a similar function?

    The puzzles in question:

    oile46x1

    oile46x1

    • This reply was modified 1 month, 3 weeks ago by c4cc.
    #71395
    kdv
    Participant

    You didn’t get the point. You puzzles are useless, they cannot be tested without the main part of your app. Just looking at the screenshot there is nothing to say :unsure: It’s like a couple of words torn from the whole text. Nobody even tries.

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

    #71402
    c4cc
    Participant

    Done, here is a test app as per attachments. Puzzles:

    430878484-289536107492906-2424992886442237375-n

    Basically, I want clones as individuals to only disappear and explode when they come into contact with the red object (player). Not all disappear together. How do I do this?

    • This reply was modified 1 month, 3 weeks ago by c4cc.
    • This reply was modified 1 month, 3 weeks ago by c4cc.
    • This reply was modified 1 month, 3 weeks ago by c4cc.
    • This reply was modified 1 month, 3 weeks ago by c4cc.
    Attachments:
    You must be logged in to view attached files.
    #71423
    kdv
    Participant

    Should work exactly like here https://v3d.net/trh

    Attachments:
    You must be logged in to view attached files.

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

    #71446
    c4cc
    Participant

    Thanks for the reply. Sorry for being late.

    Should work exactly like here https://v3d.net/trh

    While the individual clones do disappear when touched, their explosions follow around the player. I’d like the explosions to remain in place where the clone is removed.

    #71447
    kdv
    Participant

    Remove one puzzle and they won’t follow. It’s initially your puzzles and it’s you who added this following.

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

    #71448
    c4cc
    Participant

    Found the problem.

    Should work exactly like here https://v3d.net/trh

    I’ll try this out and let you know ASAP, thanks :good:

    Attachments:
    You must be logged in to view attached files.
    #71450
    kdv
    Participant

    Found the problem.

    Just remove the “parent to object” puzzle. Why did you add it? It’s not needed at all in this case.

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

    #71452
    c4cc
    Participant

    My bad. I was so tired, I failed to see that mistake

    #71453
    c4cc
    Participant

    Should work exactly like here https://v3d.net/trh

    Attached is the variant of what you posted here. Yet not only could the clones not disappear when individually touched, the clones’ template went missing for some reason. What went wrong?

    430878484-289536107492906-2424992886442237375-n-1

    • This reply was modified 1 month, 2 weeks ago by c4cc.
    Attachments:
    You must be logged in to view attached files.
    #71455
    kdv
    Participant

    Your logic went wrong. See the last loop with more attention.

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

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