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.

Trigger individual objects’ functions in a list via looping puzzles

Home Forums Puzzles Trigger individual objects’ functions in a list via looping puzzles

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #79938
    c4cc
    Participant

    Enemies shooting when the player is within a certain range. Yet when the player is within that range, only 1 cloned object shoots.

    I have clones of both an object and its bullet in a list that I need to activate individually when within range with the main object.

    Also, how do I get rid of that original shot that activates whenever player is within range of the enemies in list. Because that original shot looks out of place, compared to its clones

    l41

    Verge3d app:
    https://drive.google.com/file/d/1aXbk1L74iIc4bVgJS459qpXkSbeSPXrc/view

    • This topic was modified 1 month ago by c4cc.
    #79976
    xeon
    Customer

    Hi c4cc…. hope you have figured this out by now…. your questions are very specific to your puzzle and your own logic flows…making it very hard, at least for me, to dive in and find a quick answer.

    My initial guess is the logic timing….do you have a timing map or visual that shows all the things you have going on with all these time events? Once you start programming based on time..things can get lost, missed etc making it hard to diagnose. Have you added print to console statements within your loops to diagonose whats firing when and if its ocurreing at the right time?

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #79978
    c4cc
    Participant

    your questions are very specific to your puzzle and your own logic flows…making it very hard, at least for me, to dive in and find a quick answer.

    My initial guess is the logic timing….do you have a timing map or visual that shows all the things you have going on with all these time events? Once you start programming based on time..things can get lost, missed etc making it hard to diagnose.

    True, timing especially can throw intended events off. Have to keep this in mind

    Have you added print to console statements within your loops to diagonose whats firing when and if its ocurring at the right time?

    New zip file for puzzles with print to console(F12). Sadly it didn’t say anything.

    https://drive.google.com/file/d/1aXbk1L74iIc4bVgJS459qpXkSbeSPXrc/view

    The puzzles (ignore the ones disabled):

    l4x1

    • This reply was modified 4 weeks, 1 day ago by c4cc.
    • This reply was modified 4 weeks, 1 day ago by c4cc.
    #79989
    kdv
    Participant

    individual objects require individual variables to control them…

    Puzzles and JS coding. 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 the meaning at all.

    #79992
    c4cc
    Participant

    kdv, thanks for your answer, yes it works and I appreciate it. It’s just that when I either space out the cloned units or make said units move, the shots are fired a distance away from each unit like here.

    Any way for the individual shots to appear in front of each unit before said shot is fired? Regardless of position or moving?

    Again, your original answer is indeed an important game-changer

    l4x1

    l4x1

    Moving clones fire shots:
    l4x1

    When “change” is set to -3
    l4x1

    • This reply was modified 4 weeks ago by c4cc.
    #79998
    kdv
    Participant

    When “change” is set to -3

    Have no idea why it happens this way on your side :unsure:

    Removed unneeded puzzles from your code.

    Puzzles and JS coding. 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 the meaning at all.

    #80001
    c4cc
    Participant

    Thanks. Yes, this works. Shots for respective cloned units fire when said cloned units move.

    Just trying to adjust the initial position of shot before it fires with math puzzles, but it doesn’t work.

    l4x1

    l4x1

    Appreciate your help.

    • This reply was modified 3 weeks, 6 days ago by c4cc.
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.