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.

One procedure, multiple vairables and objects

Home Forums Puzzles One procedure, multiple vairables and objects

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #64304
    jamesh
    Customer

    Hi Team,

    I’m hoping someone may have an idea on how to solve this challenge I am having.

    Here is a link to the project that is currently live. This is working great with one single tent that is interactive. It becomes a lot more complex as soon as I try and make all tents in the tornado interactive.

    I can not work out how to set puzzles to work with multiple tents using the same process but all at different stages of the process (say a user clicks on three tents, opens only one… then tries to click on another few tents in the tornado… etc).

    If you were to only interact with one tent the whole way through it would work perfect. As soon as you interact with another tent at the same time the variables get crossed over and all further tent interactions are wrong.

    I have been trying to understand how to use the “procedures” puzzles and “advanced” puzzles to get around this but have been struggling to understand where and how to use them correctly and if they are what I should be using.

    I have attached a screen shot of where I am at with the puzzles…

    Any help or guidance would be greatly appreciated! :unsure:

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

    As soon as you interact with another tent at the same time the variables get crossed over

    That’s because all your variables are global, common for all actions. You should use a procedure with arguments to make them local and individual for every procedure call.

    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.

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