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.

Parse Value from Puzzles to the project code

Home Forums Puzzles Parse Value from Puzzles to the project code

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #21480
    justin_blender
    Customer

    Hi,
    I think this is a rather simple problem but i did not figure out how to do it.

    I want to use some jquery elements for my project. Maybe this can also be entirely integrated into puzzles?
    But here is what I try to do:
    I create a variable via puzzles, say “boolean_x” and set it to false
    On a specific event in the puzzle script it turns true and then an individual script shall be started. That is why I want to call the variable in my project script like “if v3d.puzzles.boolean_x == true” or ” “if v3d.puzzles.variables.boolean_x == true“? Those syntax don’t work.

    Thank you in advance!

    #21481

    Hello,

    at the moment only procedure puzzles can be directly called from JavaScript. See more here:
    https://www.soft8soft.com/docs/manual/en/introduction/Using-JavaScript.html

    Chief 3D Verger | LinkedIn | Twitter

    #21489
    justin_blender
    Customer

    Okay I will check out if I can find a work around using a procedure. Thanks Yuri!

    #21505
    justin_blender
    Customer

    Ok now I had time to try that. It is actually pretty easy. Sorry for obviously not reading closely enough through the wiki :wacko:

    But now I have two more questions:
    What for do you set the “input name” of the JSFunction? It seems to be not used anywhere else and has no effect if I change it.
    Instead, each time I change the name, a new variable under this name appears under “variables”. If I call this variable, the content is not defined. Also I am struggling to delete those created variables again.

    Thanks again!

    #21513

    Hi,

    glad you worked it out!

    You can use those input name puzzles to add arguments (input parameters) to your procedures. See more info here
    https://www.soft8soft.com/docs/manual/en/puzzles/Procedures.html

    Chief 3D Verger | LinkedIn | Twitter

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