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 andylegate » Sat Mar 29, 2008 11:24 am

Oh..............


Sorry, but I don't know if it means anything or not. Looks like it should be working for you....your sound emitter is set up correctly right? I'm sure you did it right...

thanks for pointing out my typo.....

blah....I'm not good for anything right now, I can barely keep my eyes open. Sorry to whimp out, but I'm going to go lay down......I'll check back later tonight. Keep us posted.
"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 » Sat Mar 29, 2008 11:37 am

andylegate wrote:Oh..............


Sorry, but I don't know if it means anything or not. Looks like it should be working for you....

I tried detect_trigger but still no joy. In the audio.0.elf log it seems to load with the age but it does not try to steam at the button press.

The good thing is that if it works this way, we can make it work easily for everyone with just one extra line in the quickscript.

andylegate wrote:your sound emitter is set up correctly right? I'm sure you did it right...


I am not so sure. It is the first time I used soundfx. I will play a bit with the flags.

Edit: It works! I had forgotten to set the min- and maxfdist on the 3d sound. :oops:
"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 » Sat Mar 29, 2008 1:58 pm

Outstanding D'Lanor!

Just woke up from my nap, so that's good news to hear!

So what all did you have to do to make it work?

EDIT: oh, by the way, thanks for pointing out that typo, that was the problem! Door works now, and waits until after the animation to move.
"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 » Sat Mar 29, 2008 2:18 pm

I have uploaded the modified quickscript file (alc_QuickScripts.py) to the SVN contrib/D'Lanor folder. Here is how it works: All you have to do is add a single line for your sound emitter.

Code: Select all
<clickable object>:
    quickscript:
        simpleclick:
            pythonfile: <python filename without .py>
            region: <region object>
            animation: <animation name without Male/Female>
            animtarget: <target object>
            soundemitter: <emitter object>
 


Note that this still requires the behavior in your Python script to start the animation. Perhaps this should be made optional in the quickscript, but I cannot stress enough that the behavior method is the only way to go if you want multiplayer compatibility. Anyway, here is how to start the animation with Python.

Code: Select all
...

actClickableObject = ptAttribActivator(1, 'Act: Clickable Object')
ObjectMsg = ptAttribString(2, 'Object String')
Behavior = ptAttribBehavior(3, 'Avatar animation')

...

    def OnNotify(self, state, id, events):
        if ((id == actClickableObject.id) and state):
            Avatar = PtFindAvatar(events)
            Behavior.run(Avatar)



Edit: I removed the netforce=1 from the Behavior Python code. That could have resulted in being forced to do the animation multiple times in a laggy multiplayer situation. If you have ever had your avatar moving by itself in any online Uru incarnation... this was the reason.
"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 Nadnerb » Sun Mar 30, 2008 3:18 pm

Excellent! I didn't have to write anything. :D

I've merged your quickscript addition. You can now do what andy just did over the last few pages in 4 lines. (looking at you Aloys ;))
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 » Sun Mar 30, 2008 6:07 pm

Nadnerb, I have a question about the volume of the sound responder. Currently the quickscript sets it to a default value of 1. But sound emitters have their own specific volume. Does the sound responder override the volume setting of the emitter? Because that is the impression I get when I listen to my click sound in the game.

If that is true then I can make the quickscript grab the volume from the alcscript of the emitter object. I have a working script which does that. But would it be correct to do this?
"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 Nadnerb » Sun Mar 30, 2008 6:16 pm

Yes, it would be correct. The current volume setting of 1 is a shortcut.
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 Aloys » Sun Mar 30, 2008 6:22 pm

Yay! :D
I love it when a plan comes together! :P
User avatar
Aloys
 
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Previous

Return to Building

Who is online

Users browsing this forum: No registered users and 6 guests

cron