[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.

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

Postby Maroonroon » Fri Sep 22, 2017 2:17 pm

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?
:arrow: I'm working with "Blender 2.49b + PyPRP", on "Windows 10 Family x64".
User avatar
Maroonroon
 
Posts: 33
Joined: Sun Jul 06, 2014 5:03 pm
Location: France

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

Postby Dulcamara » Sat Sep 23, 2017 2:41 am

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 45 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. :)
User avatar
Dulcamara
 
Posts: 260
Joined: Fri Sep 03, 2010 11:06 am
Location: Alabaster

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

Postby Maroonroon » Tue Sep 26, 2017 8:13 am

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
:arrow: I'm working with "Blender 2.49b + PyPRP", on "Windows 10 Family x64".
User avatar
Maroonroon
 
Posts: 33
Joined: Sun Jul 06, 2014 5:03 pm
Location: France

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

Postby dendwaler » Tue Sep 26, 2017 9:18 am

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.

Image

Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
User avatar
dendwaler
 
Posts: 875
Joined: Mon Jun 22, 2009 10:49 am
Location: Nederland

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

Postby Maroonroon » Tue Sep 26, 2017 9:52 am

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. :)
:arrow: I'm working with "Blender 2.49b + PyPRP", on "Windows 10 Family x64".
User avatar
Maroonroon
 
Posts: 33
Joined: Sun Jul 06, 2014 5:03 pm
Location: France

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

Postby Dulcamara » Tue Sep 26, 2017 10:50 am

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:
User avatar
Dulcamara
 
Posts: 260
Joined: Fri Sep 03, 2010 11:06 am
Location: Alabaster

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

Postby Maroonroon » Tue Sep 26, 2017 11:05 am

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.
:arrow: I'm working with "Blender 2.49b + PyPRP", on "Windows 10 Family x64".
User avatar
Maroonroon
 
Posts: 33
Joined: Sun Jul 06, 2014 5:03 pm
Location: France

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

Postby Maroonroon » Tue Sep 26, 2017 4:46 pm

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
:arrow: I'm working with "Blender 2.49b + PyPRP", on "Windows 10 Family x64".
User avatar
Maroonroon
 
Posts: 33
Joined: Sun Jul 06, 2014 5:03 pm
Location: France

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

Postby Dulcamara » Tue Sep 26, 2017 10:39 pm

Hallo Moonroon

can you send me a small blendfile? I will take a look at it. :)
User avatar
Dulcamara
 
Posts: 260
Joined: Fri Sep 03, 2010 11:06 am
Location: Alabaster

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

Postby Maroonroon » Fri Sep 29, 2017 10:35 am

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.
:arrow: I'm working with "Blender 2.49b + PyPRP", on "Windows 10 Family x64".
User avatar
Maroonroon
 
Posts: 33
Joined: Sun Jul 06, 2014 5:03 pm
Location: France

Next

Return to Scripting

Who is online

Users browsing this forum: No registered users and 2 guests

cron