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.

Variables and procedures

Home Forums General Questions Variables and procedures

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #46548
    georgeslambert
    Customer

    Hi,

    I’m in a trouble with alot of duplicated puzzles in an indexed chain of actions that could be solved by linking a procedure launch to a variable state : let’s say :

    If var state = x
    do procedure x+1

    Is there any way to handle this with puzzles?

    Thanks a lot!

    #46557
    georgeslambert
    Customer

    The procedure is named by number or contains number to be compared to variable value (don’t know if this is more understandable)

    #46576

    Hi,

    you can trigger a procedure by its name using the exec script puzzle:

    https://www.soft8soft.com/docs/manual/en/puzzles/Advanced.html#exec_script

    (see the usage example for the PROC variable)

    Chief 3D Verger | LinkedIn | Twitter

    #46589
    georgeslambert
    Customer

    Thanks Yuri,

    But honestly this is chinese to me. Explanation in the wiki is quiet abstruse for somebody limited in coding science.

    I took a snapshot of one my logic block.
    I have (9) evolutive steps to be performed from (7) different actions menu. A button allows me to go to next or to previous step before launching action.
    In this case, the “positive” button triggers state 6 when step variable is at 5.
    The “negative” button triggers state 4 when step variable is at 5.

    My life should be changed if i had a mean to say
    “trigers (x-1) state when variable is at x” (backward) or
    “triggers (X+1) state when variable is at x” (forward)
    and create a procedure with it for my buttons back and forward.

    Any idea how that could be done? So far,my puzzle board looks like having no ends.

    Attachments:
    You must be logged in to view attached files.
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.