Login / Registrieren
DE EN FR ES IT CZ
Zurück Nach oben

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

  • #20, by gabarts 9 years ago Zitieren
    Yes! This is great! Thanks
  • #21, by gabarts 9 years ago Zitieren
    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?
  • #22, by afrlme 9 years ago Zitieren
    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.
  • #23, by gabarts 9 years ago Zitieren
    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
  • #24, by sebastian 9 years ago Zitieren
    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...
  • #25, by afrlme 9 years ago Zitieren
    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.
  • #26, by gabarts 9 years ago Zitieren
    Worked perfectly, thanks!
  • #27, by Machtnix 9 years ago Zitieren
    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). 
  • #28, by Machtnix 9 years ago Zitieren
    @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. 
  • #29, by sebastian 9 years ago Zitieren
    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).


  • #30, by afrlme 9 years ago Zitieren
    @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.