Sound Flags

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

Re: Sound Flags

Postby Paradox » Tue Mar 25, 2008 3:30 pm

Actually, I don't think a quickscript exists at this point to play a sound file based on a click :(
Paradox
 
Posts: 1295
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Re: Sound Flags

Postby andylegate » Tue Mar 25, 2008 3:45 pm

Nope, there isn't. Only:

Footstep regions
Sound Regions
Simple Clickables
Selfanimations
SDL

Are all I see in the file.
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: Sound Flags

Postby Nadnerb » Tue Mar 25, 2008 4:12 pm

There is currently no quickscript that will do this, but I can still give you an example script..

Code: Select all
<the clickable button object>:
    logic:
        modifiers:
          - cursor: poised
            flags:
             - localelement
            activators:
             - type: objectinvolume
               remote: <click region name here>
               triggers:
                - any
            conditions:
             - type: activator
               activators:
                - type: picking
             - type: objectinbox
               satisfied: true
            actions:
              - type: responder
                 ref: :SoundResp
        actions:
          - type: responder
            name: SoundResp
            responder:
               states:
                - cmds:
                   - type: soundmsg
                     params:
                        receivers:
                         - 0011:<Name of emitter object>
                        cmds:
                         - play
                         - setvolume
                        volume: 1
                     waiton: -1
                  nextstate: 0
                  waittocmd: 0
               curstate: 0
               flags:
                - detect_trigger


Also, you can say to disregard all the ranting and such, but that doesn't mean you didn't say it all. Please do try to refrain from insinuating that we don't know nobody understands what we say, and that we intentionally don't tell people how to use anything.
Image
Live KI: 34914 MOULa KI: 23247 Gehn KI: 11588 Available Ages: TunnelDemo3, BoxAge, Odema
Nadnerb
 
Posts: 1057
Joined: Fri Sep 28, 2007 8:01 pm
Location: US (Eastern Time)

Re: Sound Flags

Postby D'Lanor » Tue Mar 25, 2008 4:46 pm

Thanks for that script, Nadnerb. But now the next question comes up: Suppose we already had a quickscript for that same clickable which for example pointed to a python file, made an avatar animate etc. do we now need to convert that quickscript to a full alcscript and merge it, or will the existing quickscript work alongside this new script?
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Sound Flags

Postby andylegate » Tue Mar 25, 2008 9:11 pm

Yes thank you, I'll give it a try tomorrow. And that's a good question D'Lanor.

Sorry, but I will rant. That's who I am. Just as others are who they are. I was not insinuating that anyone is intentionally keeping information from anyone, just that it seems sometime that people do assume that we know how to use it. Sorry, but you'll find examples of that all over the forum. Different people will ask a question and then have it answered, only with the apperance that they already know scripting.

I do completely understand that many times, people just don't have the time to write a nice tutorial about how everything works. And yes, sometimes it is a lot better for some people to figure things out on their own.

However, I firmly believe that many new writers lives would be a LOT easier, and the task of trying to make things not as daunting, if there were simply a "Idiots Guild To ALC" just as D'Lanor suggested. But of course, the people that seem to know it well, seem to know how to set up scripting as though it's nothing to have to think about, do not seem to have the time to make such a guide.

Sorry that you took offense to anything I said earlier. But if you think I was bad in this post, You should see me when I REALLY get PO'ed........ I turn all green, cloths rip off me and I smash things. :D
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: Sound Flags

Postby Jojon » Wed Mar 26, 2008 12:52 am

andylegate wrote:...I was not insinuating that anyone is intentionally keeping information from anyone...

I think NaderB may have been referring to something I wrote, with that part. What I, in turn, was referring to, was simply the fact that AFAIK the devs have kindly been asked by Cyan, not to publish, willie-nillie, every little thing they manage to glean about the internals of Plasma. My apologies if I came off differently.
..and this shouldn't really affect us, since you and I don't really need to know all those things -- our access is through the middle layers created by the dev team, however closely these mirror the underlying mechanics.
Jojon
 
Posts: 1116
Joined: Sun Sep 30, 2007 5:49 am

Re: Sound Flags

Postby andylegate » Wed Mar 26, 2008 3:50 am

Hmmmmm......first bad news, I'm getting an export error now, didn't like this line in Nadnerb's script:

Code: Select all
ref: :SoundResp


Thinking that the extra colon was a typo, I removed it and tried again.

Again, an export error on that same line, the console says that "mapping is not allowed here" same for both errors.
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: Sound Flags

Postby andylegate » Wed Mar 26, 2008 5:17 am

Okay, got it to export by commenting out that line. Of course don't know what that messes up. Only thing I could find in the plugin scripting that were examples of using that line were things like:

Code: Select all
ref: $SndRgn\n


So I don't know.

However I figured that the worst would be that I still don't hear anything......

Nope, worst was my door stopped working! :o

So I'm commenting it all out for now and giving up on this and go back to soundless effects for now. I would continue pursuing this, as again, it should be something that can be done. But unfortunately it feels like I'm pulling teeth that don't want to come out, or I'm apparently offending people.

So in order to help keep the peace so to speak, I'll leave this alone and let someone else figure it out.
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: Sound Flags

Postby D'Lanor » Wed Mar 26, 2008 6:33 am

I will give it a try later on. Just out of curiosity and because my question to the developers about this has not yet been answered: Are you using the full alcscript alongside a quickscript for the same clickable?

btw, it looks like the indentation is a bit off in the section you are having problems with. And I think the indentation needs some checking throughout the whole script because it is inconsistent and not following the wiki:

Recommended Style

It is recommended to make an indentation 4 spaces (or one tab in blender) in width.

It is also recommended to cut the last indentation before a list item indicator (dash-sign) to 2 spaces
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Sound Flags

Postby andylegate » Wed Mar 26, 2008 6:59 am

The answer is : Yes. I'm using a quick script for making the door move. It references a python file, like the one Trylon made to move his gate. Mine moves the door to the side.

Hadn't thought about commenting out the quickscript for that to see what would happen.

I don't know about the spacing and indents. I have to go with what gets put out. I thought I knew about it, as it seemed the rule was you indented with 4 spaces, or not. Then with like the new sound flags, I noticed that indents are not always 4 spaces, now they have 2 spaces. So, again, I don't know. Just a babe in the woods here. I copy what I see, hold my breath, and hope it works without really knowing what I'm doing.
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

PreviousNext

Return to Building

Who is online

Users browsing this forum: No registered users and 4 guests

cron