Page 1 of 2

Sound regions wanting a material...?

PostPosted: Tue Sep 30, 2008 11:48 pm
by Kierra
It's been awhile since I've added sound regions, and I wasn't all that great at it then....

But I certainly don't recall sound regions needing materials. But apparently thats what blender wants, because every time I try to export the age, it gives me this:

Code: Select all
[Visual Object Region.001]
 [LogicHelper]
   Exporting actions
   [ResponderModifier Region.001_SndRgn]
    appending message receiver: 0011:Ambsound
    plSoundMsg: volume: 1.000000
    plSoundMsg: Set command: play
    plSoundMsg: Set command: setvolume
    appending message receiver: 0011:Ambsound
    plSoundMsg: Set command: stop
   Exporting modifiers
   Exporting modifiers
  [LogicModifier Region.001_Enter_SndRgn]
   Initial self.fFlags is: BitVector: []
   Got flag: multitrigger - 6
   self.fFlags is now: BitVector: [  40]
   Conditions:
    Found Condition Region.001_Enter_SndRgn of type: volumesensor
   Activators:
    Found Activator Region.001_Enter_SndRgn of type: objectinvolume
   Actions:
[{'type': 'responder', 'ref': '$SndRgn'}]
  Action is of type responder
Locating responder mod reference '$SndRgn'
  Appending Receiver: 00006921,0000,007C,Region.001_SndRgn
  [LogicModifier Region.001_Exit_SndRgn]
   Initial self.fFlags is: BitVector: []
   Got flag: multitrigger - 6
   self.fFlags is now: BitVector: [  40]
   Conditions:
    Found Condition Region.001_Exit_SndRgn of type: volumesensor
   Activators:
    Found Activator Region.001_Exit_SndRgn of type: objectinvolume
   Actions:
[{'type': 'responder', 'ref': '$SndRgn'}]
  Action is of type responder
Locating responder mod reference '$SndRgn'
  Appending Receiver: 00006921,0000,007C,Region.001_SndRgn
 [Draw Interface Region.001]
Traceback (most recent call last):
  File "<string>", line 169, in open_file
  File "<string>", line 83, in export_age
  File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\prp_ResMana
ger.py", line 769, in export_all
    plDrawInterface.Export(self,obj,scnobj,name,SceneNodeRef,isdynamic,softVolum
eParser, water)
  File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\prp_DrawCla
sses.py", line 1556, in _Export
    drawi.data.export_obj(obj,SceneNodeRef,isdynamic,softVolParser, water)
  File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\prp_DrawCla
sses.py", line 1595, in export_obj
    raise AttributeError("Object %s has no material. Export cannot continue!" %
name)
AttributeError: Object Region.001 has no material. Export cannot continue!


If I give it a material it exports fine....but then, I have this huge glaringly white square encompassing my age Image Which is SOOOO cramping my style.

See, what I'm trying to do, is set up some background music for my age, but I want it to trigger at a certain area. Hence the sound region.

Last I recall, sound regions are supposed to be all invisible and stuff. :?

Any ideas on what I'm missing?

~Kia

Re: Sound regions wanting a material...?

PostPosted: Wed Oct 01, 2008 8:47 am
by Trylon
It looks like the region isn't treated as a region.
Make sure your alcscript has "type: region" in it.

Re: Sound regions wanting a material...?

PostPosted: Wed Oct 01, 2008 9:01 am
by Kierra
I plugged it in exactly how the tutorial said to:

Code: Select all
Ambsound:
   type: soundemit
   sound:
      flags:
         - localonly
         - autostart
      file: diatonis_secret-unive
      volume: 1.0
      type: backgroundmusic
         
   Region.002:
      region:
         type: soundregion
         soundemitter: Ambsound


It's still asking for a material.

~Kia

Re: Sound regions wanting a material...?

PostPosted: Wed Oct 01, 2008 9:42 am
by D'Lanor
You have to keep the "type | region" text property, which was added when you created the region from the Scripts > PyPRP menu: "Add a (generic) logic region"

Using "type: soundregion" in Alcscript only is not enough because this is in fact a quickscript which is not recognized as a valid region elsewhere.

Edit: Hmm, on second thought maybe even the text property will not help anymore. I think the safest way to fix this is to make the quickscript force the region type to logic.

Re: Sound regions wanting a material...?

PostPosted: Wed Oct 01, 2008 10:09 am
by Kierra
Oh good. that worked. thanks :)

Well, sort of worked. The music started playing immediately, instead of only starting when the avatar enters the region...but hey, small victory.

thanks!

~Kia

Re: Sound regions wanting a material...?

PostPosted: Wed Oct 01, 2008 1:08 pm
by boblishman
remove the "autostart" flag from your alcscript ... thats whats making it start as soon as you link in ...

Re: Sound regions wanting a material...?

PostPosted: Wed Oct 01, 2008 1:30 pm
by Kierra
Ok good, that stopped it from automatically starting...

but now the sound region isn't triggering either :?

~Kia

Re: Sound regions wanting a material...?

PostPosted: Wed Oct 01, 2008 1:33 pm
by boblishman
did you create it using Scripts/Prp/Create a Generic Logic Regiion ? (your region needs bounds!)

Might be a good idea to delete the one you have and make a new one using the Scripts panel ... ;)

Re: Sound regions wanting a material...?

PostPosted: Wed Oct 01, 2008 1:40 pm
by D'Lanor
Ok, you are hereby promoted to guinea pig. Can you put this file into your Blender scripts folder, replacing the existing one?

Edit: attachment removed

Re: Sound regions wanting a material...?

PostPosted: Wed Oct 01, 2008 1:48 pm
by Kierra
:lol:

Ookay...loaded that D'lanor, but if it was supposed to make my sound region work, it didn't. *shrug*

and yes bob, I did. I'll try it again

~Kia