Page 1 of 4

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

PostPosted: Fri Sep 22, 2017 2:17 pm
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?

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

PostPosted: Sat Sep 23, 2017 2:41 am
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 477 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. :)

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

PostPosted: Tue Sep 26, 2017 8:13 am
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

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

PostPosted: Tue Sep 26, 2017 9:18 am
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.

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

PostPosted: Tue Sep 26, 2017 9:52 am
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. :)

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

PostPosted: Tue Sep 26, 2017 10:50 am
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:

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

PostPosted: Tue Sep 26, 2017 11:05 am
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". :)

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

PostPosted: Tue Sep 26, 2017 4:46 pm
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

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

PostPosted: Tue Sep 26, 2017 10:39 pm
by Dulcamara
Hallo Moonroon

can you send me a small blendfile? I will take a look at it. :)

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

PostPosted: Fri Sep 29, 2017 10:35 am
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