Page 4 of 4

Re: Multibutton puzzle

PostPosted: Fri Mar 26, 2010 3:49 am
by Justintime9
Awesome, it works! I guess I don't even need that reset button :D
Now I just need one thing to perfect it, here's the script for one of the "dummy" buttons (clickable but doesn't do anything)

Code: Select all
P1:
    physical:
        pinned: true
    quickscript:
        simpleclick:
            pythonfile: SparklingPalaceBookGUI
            region: FakeButtonsReg


How would I make it so that those buttons make the same sound as the working buttons? Since it doesn't really do anything I hope that doesn't make things too complicated...

Re: Multibutton puzzle

PostPosted: Fri Mar 26, 2010 5:25 am
by D'Lanor
Like this...
Code: Select all
P1:
    physical:
        pinned: true
    logic:
        modifiers:
          - name: P1_click
            cursor: poised
            flags:
              - localelement
            activators:
              - type: objectinvolume
                remote: FakeButtonsReg
                triggers:
                  - any
            conditions:
              - type: activator
                activators:
                  - type: picking
              - type: objectinbox
                satisfied: true
            actions:
              - type: responder
                ref: :P1_resp
        actions:
          - type: responder
            name: P1_resp
            responder:
                states:
                  - cmds:
                      - type: soundmsg
                        params:
                            receivers:
                              - 0011:SoundPush
                            cmds:
                              - play
                              - setvolume
                            volume: 1
                    nextstate: 0
                    waittocmd: 0
                curstate: 0
                flags:
                  - detecttrigger

Re: Multibutton puzzle

PostPosted: Tue Mar 30, 2010 12:22 pm
by Justintime9
Ok, I added that for all of my paintings (changing the name for each button of course) and exported it. Strangely, while all the buttons are clickable, only some of them make the sound. Thinking perhaps my moving the sound emitter, and changing the volume to 2 would do something, I did so and exported.

This time only certain buttons make a sound, but they are different buttons. What's strange is it's in no definite pattern.

Re: Multibutton puzzle

PostPosted: Tue Mar 30, 2010 12:41 pm
by D'Lanor
Justintime9 wrote:Ok, I added that for all of my paintings (changing the name for each button of course) and exported it. Strangely, while all the buttons are clickable, only some of them make the sound. Thinking perhaps my moving the sound emitter, and changing the volume to 2 would do something, I did so and exported.

This time only certain buttons make a sound, but they are different buttons. What's strange is it's in no definite pattern.

The volume range goes from 0 to 1. 2 is not a valid value.

Keep in mind that when you use a single emitter for multiple clickables your sound will not trigger a second time when it is already playing. So if you click in fast succession you are definitely going to miss sounds.

Re: Multibutton puzzle

PostPosted: Tue Mar 30, 2010 2:25 pm
by Justintime9
Well actually the first button I pressed didn't work so it's can't be that it was already playing. Also, what would you suggest I set the volume to so it can be heard through the whole room? Although if 1 is the maximum, and it was on 1, either that's not loud enough or volume isn't what's causing it. Any ideas?

Re: Multibutton puzzle

PostPosted: Wed Mar 31, 2010 4:38 am
by D'Lanor
You have to increase your minfdist and maxfdist settings. Your current settings (15 to 30) are for close range. It means that the sound starts fading out at 15 units away from the emitter and has completely faded out at 30 units.

Re: Multibutton puzzle

PostPosted: Thu Apr 01, 2010 7:46 pm
by Justintime9
Awesome, that was it. Everything seems to be working now.

Re: Multibutton puzzle

PostPosted: Fri Apr 02, 2010 10:00 pm
by Grogyan
Justintime9 wrote:After perfecting Shinelight Manor, I'm finally ready to add a major puzzle. Here's the plan:

I'll have about 20 buttons, each of which is clickable. 10 to 5, if pressed in the correct order will open a door. There will also be a reset button for the puzzle, to close the door.

How exactly would I create a puzzle like this? I'm assuming there'll have to be a click region for each button, so it's clickable, that will point to a certain python file with the correct order the buttons have to be pushed in. Then of course the reset button will have to work in there somewhere.


Good on you for getting far enough to do it, my puzzle plans are on hold till clickable GUI's and animations are better implmented.
One puzzle idea uses a growing grid of binary digits that have to be toggled in a certain way to release a lock.

I'll keep an ear out to see how your going on this.