[Blender-PyPRP-AlcScript] soundfx isn't playing

Help bring our custom Ages to life! Share tips and tricks, as well as code samples with other developers.
Maroonroon
Posts: 277
Joined: Sun Jul 06, 2014 5:03 pm
MOULa KI#: 0
Location: France
Contact:

[Blender-PyPRP-AlcScript] soundfx isn't playing

Post by Maroonroon »

Hello;

I'm trying to play a soundfx with an avatar animation, but the soundfx isn't playing when I test in game.
Here is the script:
Show Spoiler
The avatar animation works but not the soundfx.
It's my first avatar animation test and my first soundfx test...
I've set the sound folder (sfx) in Blender.
I think it's the "Door01Close01Rspndr" thing, but I don't understand where to use it because I have no "Door01Close01Rspndr" object in Blender.
Can you help me, please?
Dulcamara
Posts: 381
Joined: Fri Sep 03, 2010 11:06 am
MOULa KI#: 0
Location: Alabaster

Re: [Blender-PyPRP-AlcScript] soundfx isn't playing

Post by Dulcamara »

Hello Maroonroon :)

I made you a little Blendfile with my Door and my Doorscript wich included the Sound Sfx.
Maybe you can learn with this script to use the sound.


Test_Door.7z
(1019.34 KiB) Downloaded 1076 times
Sorry when i can not explain it better. English is not my language. But if you have a question about it feel free to ask. I will try to explain. :)
Maroonroon
Posts: 277
Joined: Sun Jul 06, 2014 5:03 pm
MOULa KI#: 0
Location: France
Contact:

Re: [Blender-PyPRP-AlcScript] soundfx isn't playing

Post by Maroonroon »

Thank you very much Dulcamara, I will test it monday. :)

Edit:

I mixed your script + another one to try to make a sliding door, and it seems to work (kind of).
The soundfx works, the sliding door animation works, the avatar animation works, but the avatar always goes on "Door01SeekPoint01".
I'll try to understand why...
Here is the script:
Show Spoiler
User avatar
dendwaler
Posts: 936
Joined: Mon Jun 22, 2009 10:49 am
MOULa KI#: 0
Location: Nederland

Re: [Blender-PyPRP-AlcScript] soundfx isn't playing

Post by dendwaler »

wow,
that script seems a bit overcomplicated.
Did your first script work?
If it did and only sound was missing then change the waiton to -1 in that script like this

Code: Select all

- type: soundmsg
                        params:
                            receivers:
                              - 0011:Door01Close01Sound
                            cmds:
                              - play
                              - setvolume
                            volume: 0.8
                        waiton: -1
I have good hope that should do it.
Those wonderfull Worlds are called " Ages" , because that is what it takes to build one.



Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
Maroonroon
Posts: 277
Joined: Sun Jul 06, 2014 5:03 pm
MOULa KI#: 0
Location: France
Contact:

Re: [Blender-PyPRP-AlcScript] soundfx isn't playing

Post by Maroonroon »

Maroonroon wrote:the avatar always goes on "Door01SeekPoint01"
It works now.
Here is the script:
Show Spoiler
But now, the avatar animation works only on "Door01SeekPoint01".
I'll try again to find a solution...
dendwaler wrote:Did your first script work?
If it did and only sound was missing then change the waiton to -1 in that script like this

Code: Select all

- type: soundmsg
                        params:
                            receivers:
                              - 0011:Door01Close01Sound
                            cmds:
                              - play
                              - setvolume
                            volume: 0.8
                        waiton: -1
Hello dendwaler;
Yes it did works but the soundfx.
But as the door was a sliding door, this script wasn't enough.
I'll try it later, for another Blender object. :)
Dulcamara
Posts: 381
Joined: Fri Sep 03, 2010 11:06 am
MOULa KI#: 0
Location: Alabaster

Re: [Blender-PyPRP-AlcScript] soundfx isn't playing

Post by Dulcamara »

Hello Maroonroon
this is the part of my Button script. You see the ANI_12Knopf have the ref: ANI_12Auf and the ANI_12Knopf_1 have the ref:ANI_12_2
Show Spoiler
In your script i see only the ref:Door01OpenClose

WOW what a long long script :shock:
Maroonroon
Posts: 277
Joined: Sun Jul 06, 2014 5:03 pm
MOULa KI#: 0
Location: France
Contact:

Re: [Blender-PyPRP-AlcScript] soundfx isn't playing

Post by Maroonroon »

Dulcamara wrote:this is the part of my Button script. You see the ANI_12Knopf have the ref: ANI_12Auf and the ANI_12Knopf_1 have the ref:ANI_12_2
In your script i see only the ref:Door01OpenClose
I changed it in my last script, now there's a "Door01OpenClose01" and a "Door01OpenClose02". :)
Last edited by Maroonroon on Fri Oct 06, 2017 12:35 pm, edited 2 times in total.
Maroonroon
Posts: 277
Joined: Sun Jul 06, 2014 5:03 pm
MOULa KI#: 0
Location: France
Contact:

Re: [Blender-PyPRP-AlcScript] soundfx isn't playing

Post by Maroonroon »

Maroonroon wrote:It works now.
[...]
But now, the avatar animation works only on "Door01SeekPoint01".
I'll try again to find a solution...
I really don't understand why the avatar animation works on "Door01SeekPoint01" (door opened or closed), but not on "Door01SeekPoint02" (door opened or closed)... :?

Script:
Show Spoiler
Dulcamara
Posts: 381
Joined: Fri Sep 03, 2010 11:06 am
MOULa KI#: 0
Location: Alabaster

Re: [Blender-PyPRP-AlcScript] soundfx isn't playing

Post by Dulcamara »

Hallo Moonroon

can you send me a small blendfile? I will take a look at it. :)
Maroonroon
Posts: 277
Joined: Sun Jul 06, 2014 5:03 pm
MOULa KI#: 0
Location: France
Contact:

Re: [Blender-PyPRP-AlcScript] soundfx isn't playing

Post by Maroonroon »

Dulcamara wrote:can you send me a small blendfile? I will take a look at it. :)
:arrow: Attachment removed

Edit:
Maroonroon wrote: I really don't understand why the avatar animation works on "Door01SeekPoint01" (door opened or closed), but not on "Door01SeekPoint02" (door opened or closed)... :?
I found the errors in my script and now it works, I think.
I also used Blender "parenting" for the different objects that slides with the door.

The next step is to load/save the sliding door state (opened or closed)...
I used PlasmaShop to create a "a.sdl" file, and I tried different quickscript but they don't works for my sliding door.
I think I have to use python...
Then, I used PlamaShop to create a "aSlidingDoors.py" and a "a.pak" files, I edited the "aSlidingDoors.py" file to change the class name to "aSlidingDoors(ptResponder)" (or "aSlidingDoors(ptModifier)" :?: ) and the "__init__ self.id", but I don't know how to use the "aSlidingDoors.py" file itself now. :?
  • How to call my python file in AlcScript?
  • How to check the current state of the door?
  • How to change the state of the door (for both of the buttons at the same time, depending of the current state of the door)?
It will be a public Age.

Shorter script:
Show Spoiler
Last edited by Maroonroon on Fri Oct 06, 2017 12:35 pm, edited 1 time in total.
Post Reply

Return to “Scripting”