Puzzle Design Thread (for classic adventure Lucasarts style or Sierra)

  • #20, by gabartsWednesday, 24. May 2017, 13:47 7 years ago
    Yes! This is great! Thanks

    Forum Fan

    137 Posts


  • #21, by gabartsMonday, 05. June 2017, 12:48 7 years ago
    I'd like to execute the same action on a scene object, I've linked 3 conditions and each time the action is different. My command is "execute command" on object but the problem is that the character is performing all the actions at once.

    I mean, the first time he peforms the command I change the 1 condition to true, but I've put the code for the "new condition" with an if in the same execute command, so is basically checking 3 conditions in a row...

    How to perform the 1 action, then stop and only the second time I click to check for the second condition?

    Forum Fan

    137 Posts

  • #22, by afrlmeMonday, 05. June 2017, 12:54 7 years ago
    I'd like to execute the same action on a scene object, I've linked 3 conditions and each time the action is different. My command is "execute command" on object but the problem is that the character is performing all the actions at once.

    I mean, the first time he peforms the command I change the 1 condition to true, but I've put the code for the "new condition" with an if in the same execute command, so is basically checking 3 conditions in a row...

    How to perform the 1 action, then stop and only the second time I click to check for the second condition?
    Use a value instead. wink

    if value "example" equals 3
     add some action parts here
    endif
    if value "example" equals 2
     add some action parts here
    endif
    if value "example" equals 1
     add some action parts here
    endif

    Notice the reverse order of values. If you do it the other way then you need to include a quit current action action part just before each of the endif action parts.

    Imperator

    7278 Posts

  • #23, by gabartsMonday, 05. June 2017, 13:52 7 years ago
    Thanks! I tought also to another solution, much more longer, of using different duplicate objects but this is the quickest if I manage to make it working smile

    Forum Fan

    137 Posts

  • #24, by sebastianMonday, 05. June 2017, 14:18 7 years ago
    if value "example" equals 3
     add some action parts here
    endif
    if value "example" equals 2
     add some action parts here
    endif
    if value "example" equals 1
     add some action parts here
    endif

    Notice the reverse order of values. If you do it the other way then you need to include a quit current action action part just before each of the endif action parts.

    In case you check for "equal" it doesn't matter which order you sort them...

    Thread Captain

    2346 Posts

  • #25, by afrlmeMonday, 05. June 2017, 14:27 7 years ago
    hehe, but if they incremented the value inside of the if query then it would matter.

    if value x = 1
     some actions
     value x +1 or value x = 2
    end if
    if value x = 2
    ... etc.

    it would end up triggering the actions in the next query.

    Imperator

    7278 Posts

  • #26, by gabartsMonday, 05. June 2017, 14:36 7 years ago
    Worked perfectly, thanks!

    Forum Fan

    137 Posts

  • #27, by MachtnixMonday, 05. June 2017, 15:22 7 years ago
    Notice the reverse order of values. If you do it the other way then you need to include a quit current action action part just before each of the endif action parts.

    What is this "quit"? I have learned that "quit" works in loops only (which I can confirm). 

    Thread Captain

    1097 Posts

  • #28, by MachtnixMonday, 05. June 2017, 15:43 7 years ago
    @AFRLme: I need to log in on dropbox to download your puzzle example. But I haven't an account, And I don't want one. 

    Thread Captain

    1097 Posts

  • #29, by sebastianMonday, 05. June 2017, 16:41 7 years ago
    Notice the reverse order of values. If you do it the other way then you need to include a quit current action action part just before each of the endif action parts.

    What is this "quit"? I have learned that "quit" works in loops only (which I can confirm). 
    "quit action" is an action part in VS. The "code" he posted was pseudocode representing only action parts, not lua.
    Quitting an action in VS itself can be done everytime. It just "kills" the containing action parts (if any).


    Thread Captain

    2346 Posts

  • #30, by afrlmeMonday, 05. June 2017, 16:44 7 years ago
    @AFRLme: I need to log in on dropbox to download your puzzle example. But I haven't an account, And I don't want one. 
    Anyone should be able to download it. There is usually 2 download options with dropbox. Add to your dropbox account or download directly. I'm pretty sure you don't need an account or need to be logged in.

    @ Machtnix: quit current action is an action part that prevents the rest of the action parts listed after it from being executed. Basically it kills the entire action block.

    *edit: sorry. I shared the wrong link. Here you go: https://www.dropbox.com/s/tbm3v3p0zf0zjw1/CyclePuzzle.zip?dl=0 Just click on the no thanks & continue button & you should be able to access the page with a download button on it.

    If you ever see me talking about actions or if queries & they are written in italic, then I'm likely referring to action parts. I will always write Lua script in code boxes.

    Imperator

    7278 Posts