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

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

-
- 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:

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
[code]Door01:
animations:
- name: Door01Animation
autostart: 0
loop: 0
logic:
actions:
- type: responder
name: Door01OpenClose
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01SeekPoint01
callbacks:
- marker: ButtonTouch
receiver: respondermod:Door01OpenClose
user: 0
waiton: -1
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 0.8
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Handle01
animname: Door01Handle01Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Handle02
animname: Door01Handle02Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Collider
animname: Door01ColliderAnimation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Button01
animname: Door01Button01Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Button02
animname: Door01Button02Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01SeekPoint01
animname: Door01SeekPoint01Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01SeekPoint02
animname: Door01SeekPoint02Animation
cmds:
- setforewards
- continue
waiton: -1
nextstate: 1
waittocmd:
- key: 0
msg: 0
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01SeekPoint01
callbacks:
- marker: ButtonTouch
receiver: respondermod:Door01OpenClose
user: 0
waiton: -1
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 0.8
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Handle01
animname: Door01Handle01Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Handle02
animname: Door01Handle02Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Collider
animname: Door01ColliderAnimation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Button01
animname: Door01Button01Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Button02
animname: Door01Button02Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01SeekPoint01
animname: Door01SeekPoint01Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01SeekPoint02
animname: Door01SeekPoint02Animation
cmds:
- setbackwards
- continue
waiton: -1
nextstate: 0
waittocmd:
- key: 0
msg: 0
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01SeekPoint02
callbacks:
- marker: ButtonTouch
receiver: respondermod:Door01OpenClose
user: 0
waiton: -1
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 0.8
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Handle01
animname: Door01Handle01Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Handle02
animname: Door01Handle02Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Collider
animname: Door01ColliderAnimation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Button01
animname: Door01Button01Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Button02
animname: Door01Button02Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01SeekPoint01
animname: Door01SeekPoint01Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01SeekPoint02
animname: Door01SeekPoint02Animation
cmds:
- setforewards
- continue
waiton: -1
nextstate: 1
waittocmd:
- key: 0
msg: 0
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01SeekPoint02
callbacks:
- marker: ButtonTouch
receiver: respondermod:Door01OpenClose
user: 0
waiton: -1
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 0.8
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Handle01
animname: Door01Handle01Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Handle02
animname: Door01Handle02Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Collider
animname: Door01ColliderAnimation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Button01
animname: Door01Button01Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Button02
animname: Door01Button02Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01SeekPoint01
animname: Door01SeekPoint01Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01SeekPoint02
animname: Door01SeekPoint02Animation
cmds:
- setbackwards
- continue
waiton: -1
nextstate: 0
waittocmd:
- key: 0
msg: 0
curstate: 0
flags:
- detecttrigger
Door01Button01:
animations:
- name: Door01Button01Animation
autostart: 0
loop: 0
logic:
modifiers:
- cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: Door01Region01
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
actions:
- type: responder
ref: :Door01OpenClose
Door01Button02:
animations:
- name: Door01Button02Animation
autostart: 0
loop: 0
logic:
modifiers:
- cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: Door01Region02
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
actions:
- type: responder
ref: :Door01OpenClose
Door01Collider:
animations:
- name: Door01ColliderAnimation
autostart: 0
loop: 0
Door01Handle01:
animations:
- name: Door01Handle01Animation
autostart: 0
loop: 0
Door01Handle02:
animations:
- name: Door01Handle02Animation
autostart: 0
loop: 0
Door01SeekPoint01:
animations:
- name: Door01SeekPoint01Animation
autostart: 0
loop: 0
logic:
actions:
- type: oneshot
name: Door01SeekPoint01
oneshot:
animation: ButtonTouch
Door01SeekPoint02:
animations:
- name: Door01SeekPoint02Animation
autostart: 0
loop: 0
logic:
actions:
- type: oneshot
name: Door01SeekPoint02
oneshot:
animation: ButtonTouch
Door01Sound:
type: soundemit
sound:
flags:
- localonly
- is3dsound
minfdist: 100
maxfdist: 250
file: clftDoor_Button
volume: 0.8
type: soundfx[/code]
Re: [Blender-PyPRP-AlcScript] soundfx isn't playing
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
I have good hope that should do it.
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
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!
Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
-
- 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 »
It works now.Maroonroon wrote:the avatar always goes on "Door01SeekPoint01"
Here is the script:
- Show Spoiler
[code]Door01:
animations:
- name: Door01Animation
autostart: 0
loop: 0
logic:
actions:
- type: responder
name: Door01OpenClose01
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01SeekPoint01
callbacks:
- marker: ButtonTouch
receiver: respondermod:Door01OpenClose01
user: 0
waiton: -1
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 0.8
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Handle01
animname: Door01Handle01Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Handle02
animname: Door01Handle02Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Collider
animname: Door01ColliderAnimation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Button01
animname: Door01Button01Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Button02
animname: Door01Button02Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01SeekPoint01
animname: Door01SeekPoint01Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01SeekPoint02
animname: Door01SeekPoint02Animation
cmds:
- setforewards
- continue
waiton: -1
nextstate: 1
waittocmd:
- key: 0
msg: 0
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01SeekPoint01
callbacks:
- marker: ButtonTouch
receiver: respondermod:Door01OpenClose01
user: 0
waiton: -1
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 0.8
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Handle01
animname: Door01Handle01Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Handle02
animname: Door01Handle02Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Collider
animname: Door01ColliderAnimation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Button01
animname: Door01Button01Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Button02
animname: Door01Button02Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01SeekPoint01
animname: Door01SeekPoint01Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01SeekPoint02
animname: Door01SeekPoint02Animation
cmds:
- setbackwards
- continue
waiton: -1
nextstate: 0
waittocmd:
- key: 0
msg: 0
curstate: 0
flags:
- detecttrigger
- type: responder
name: Door01OpenClose02
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01SeekPoint02
callbacks:
- marker: ButtonTouch
receiver: respondermod:Door01OpenClose02
user: 0
waiton: -1
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 0.8
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Handle01
animname: Door01Handle01Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Handle02
animname: Door01Handle02Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Collider
animname: Door01ColliderAnimation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Button01
animname: Door01Button01Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Button02
animname: Door01Button02Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01SeekPoint01
animname: Door01SeekPoint01Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01SeekPoint02
animname: Door01SeekPoint02Animation
cmds:
- setforewards
- continue
waiton: -1
nextstate: 1
waittocmd:
- key: 0
msg: 0
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01SeekPoint02
callbacks:
- marker: ButtonTouch
receiver: respondermod:Door01OpenClose02
user: 0
waiton: -1
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 0.8
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Handle01
animname: Door01Handle01Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Handle02
animname: Door01Handle02Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Collider
animname: Door01ColliderAnimation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Button01
animname: Door01Button01Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Button02
animname: Door01Button02Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01SeekPoint01
animname: Door01SeekPoint01Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01SeekPoint02
animname: Door01SeekPoint02Animation
cmds:
- setbackwards
- continue
waiton: -1
nextstate: 0
waittocmd:
- key: 0
msg: 0
curstate: 0
flags:
- detecttrigger
Door01Button01:
animations:
- name: Door01Button01Animation
autostart: 0
loop: 0
logic:
modifiers:
- cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: Door01Region01
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
actions:
- type: responder
ref: :Door01OpenClose01
Door01Button02:
animations:
- name: Door01Button02Animation
autostart: 0
loop: 0
logic:
modifiers:
- cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: Door01Region02
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
actions:
- type: responder
ref: :Door01OpenClose02
Door01Collider:
animations:
- name: Door01ColliderAnimation
autostart: 0
loop: 0
Door01Handle01:
animations:
- name: Door01Handle01Animation
autostart: 0
loop: 0
Door01Handle02:
animations:
- name: Door01Handle02Animation
autostart: 0
loop: 0
Door01SeekPoint01:
animations:
- name: Door01SeekPoint01Animation
autostart: 0
loop: 0
logic:
actions:
- type: oneshot
name: Door01SeekPoint01
oneshot:
animation: ButtonTouch
Door01SeekPoint02:
animations:
- name: Door01SeekPoint02Animation
autostart: 0
loop: 0
logic:
actions:
- type: oneshot
name: Door01SeekPoint02
oneshot:
animation: ButtonTouch
Door01Sound:
type: soundemit
sound:
flags:
- localonly
- is3dsound
minfdist: 100
maxfdist: 250
file: clftDoor_Button
volume: 0.8
type: soundfx[/code]
I'll try again to find a solution...
Hello dendwaler;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
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
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
WOW what a long long script
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
[code]ANI_12Knopf:
logic:
modifiers:
- cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: ANI_12ClickRgn #Drueckregion Aussen
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
actions:
- type: responder
ref: :ANI_12Auf
ANI_12Knopf_1:
logic:
modifiers:
- cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: ANI_12ClickRgn_1 #Drueckregion Innen
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
actions:
- type: responder
ref: :ANI_12Auf_2 [/code]
WOW what a long long script

-
- 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 »
I changed it in my last script, now there's a "Door01OpenClose01" and a "Door01OpenClose02".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

Last edited by Maroonroon on Fri Oct 06, 2017 12:35 pm, edited 2 times in total.
-
- 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 »
I really don't understand why the avatar animation works on "Door01SeekPoint01" (door opened or closed), but not on "Door01SeekPoint02" (door opened or closed)...Maroonroon wrote:It works now.
[...]
But now, the avatar animation works only on "Door01SeekPoint01".
I'll try again to find a solution...

Script:
- Show Spoiler
[code]Door01:
animations:
- name: Door01Animation
autostart: 0
loop: 0
logic:
actions:
- type: responder
name: Door01OpenClose01
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01SeekPoint01
callbacks:
- marker: ButtonTouch
receiver: respondermod:Door01OpenClose01
user: 0
waiton: -1
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 0.8
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Handle01
animname: Door01Handle01Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Handle02
animname: Door01Handle02Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Collider
animname: Door01ColliderAnimation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Button01
animname: Door01Button01Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Button02
animname: Door01Button02Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01SeekPoint01
animname: Door01SeekPoint01Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01SeekPoint02
animname: Door01SeekPoint02Animation
cmds:
- setforewards
- continue
waiton: -1
nextstate: 1
waittocmd:
- key: 0
msg: 0
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01SeekPoint01
callbacks:
- marker: ButtonTouch
receiver: respondermod:Door01OpenClose01
user: 0
waiton: -1
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 0.8
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Handle01
animname: Door01Handle01Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Handle02
animname: Door01Handle02Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Collider
animname: Door01ColliderAnimation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Button01
animname: Door01Button01Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Button02
animname: Door01Button02Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01SeekPoint01
animname: Door01SeekPoint01Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01SeekPoint02
animname: Door01SeekPoint02Animation
cmds:
- setbackwards
- continue
waiton: -1
nextstate: 0
waittocmd:
- key: 0
msg: 0
curstate: 0
flags:
- detecttrigger
- type: responder
name: Door01OpenClose02
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01SeekPoint02
callbacks:
- marker: ButtonTouch
receiver: respondermod:Door01OpenClose02
user: 0
waiton: -1
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 0.8
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Handle01
animname: Door01Handle01Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Handle02
animname: Door01Handle02Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Collider
animname: Door01ColliderAnimation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Button01
animname: Door01Button01Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Button02
animname: Door01Button02Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01SeekPoint01
animname: Door01SeekPoint01Animation
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01SeekPoint02
animname: Door01SeekPoint02Animation
cmds:
- setforewards
- continue
waiton: -1
nextstate: 1
waittocmd:
- key: 0
msg: 0
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01SeekPoint02
callbacks:
- marker: ButtonTouch
receiver: respondermod:Door01OpenClose02
user: 0
waiton: -1
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 0.8
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Handle01
animname: Door01Handle01Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Handle02
animname: Door01Handle02Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Collider
animname: Door01ColliderAnimation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Button01
animname: Door01Button01Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01Button02
animname: Door01Button02Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01SeekPoint01
animname: Door01SeekPoint01Animation
cmds:
- setbackwards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01SeekPoint02
animname: Door01SeekPoint02Animation
cmds:
- setbackwards
- continue
waiton: -1
nextstate: 0
waittocmd:
- key: 0
msg: 0
curstate: 0
flags:
- detecttrigger
Door01Button01:
animations:
- name: Door01Button01Animation
autostart: 0
loop: 0
logic:
modifiers:
- cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: Door01Region01
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
actions:
- type: responder
ref: :Door01OpenClose01
Door01Button02:
animations:
- name: Door01Button02Animation
autostart: 0
loop: 0
logic:
modifiers:
- cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: Door01Region02
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
actions:
- type: responder
ref: :Door01OpenClose02
Door01Collider:
animations:
- name: Door01ColliderAnimation
autostart: 0
loop: 0
Door01Handle01:
animations:
- name: Door01Handle01Animation
autostart: 0
loop: 0
Door01Handle02:
animations:
- name: Door01Handle02Animation
autostart: 0
loop: 0
Door01SeekPoint01:
animations:
- name: Door01SeekPoint01Animation
autostart: 0
loop: 0
logic:
actions:
- type: oneshot
name: Door01SeekPoint01
oneshot:
animation: ButtonTouch
Door01SeekPoint02:
animations:
- name: Door01SeekPoint02Animation
autostart: 0
loop: 0
logic:
actions:
- type: oneshot
name: Door01SeekPoint02
oneshot:
animation: ButtonTouch
Door01Sound:
type: soundemit
sound:
flags:
- localonly
- is3dsound
minfdist: 100
maxfdist: 250
file: clftDoor_Button
volume: 0.8
type: soundfx[/code]
-
- 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.

Edit:
I found the errors in my script and now it works, I think.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 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)"


- 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)?
Shorter script:
- Show Spoiler
[code]Door01:
animations:
- name: Door01Animation
autostart: 0
loop: 0
logic:
actions:
- type: responder
name: Door01OpenClose01
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01SeekPoint01
callbacks:
- marker: TouchButton
receiver: respondermod:Door01OpenClose01
user: 0
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Animation
cmds:
- setforewards
- continue
waiton: 0
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 1
waiton: -1
nextstate: 1
waittocmd:
- key: 0
msg: 0
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01SeekPoint01
callbacks:
- marker: TouchButton
receiver: respondermod:Door01OpenClose01
user: 0
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Animation
cmds:
- setbackwards
- continue
waiton: 0
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 1
waiton: -1
nextstate: 0
waittocmd:
- key: 0
msg: 0
curstate: 0
flags:
- detecttrigger
- type: responder
name: Door01OpenClose02
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01SeekPoint02
callbacks:
- marker: TouchButton
receiver: respondermod:Door01OpenClose02
user: 0
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Animation
cmds:
- setforewards
- continue
waiton: 0
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 1
waiton: -1
nextstate: 1
waittocmd:
- key: 0
msg: 0
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01SeekPoint02
callbacks:
- marker: TouchButton
receiver: respondermod:Door01OpenClose02
user: 0
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Animation
cmds:
- setbackwards
- continue
waiton: 0
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 1
waiton: -1
nextstate: 0
waittocmd:
- key: 0
msg: 0
curstate: 0
flags:
- detecttrigger
Door01Button01:
logic:
modifiers:
- cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: Door01Region01
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
actions:
- type: responder
ref: Door01OpenClose01
Door01Button02:
logic:
modifiers:
- cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: Door01Region02
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
actions:
- type: responder
ref: Door01OpenClose02
Door01SeekPoint01:
logic:
actions:
- type: oneshot
name: Door01SeekPoint01
oneshot:
animation: ButtonTouch
Door01SeekPoint02:
logic:
actions:
- type: oneshot
name: Door01SeekPoint02
oneshot:
animation: ButtonTouch
Door01Sound:
type: soundemit
sound:
flags:
- localsound
- is3dsound
file: psnlHutDoorOpenClose
volume: 1
type: soundfx
minfdist: 50
maxfdist: 150[/code]
Last edited by Maroonroon on Fri Oct 06, 2017 12:35 pm, edited 1 time in total.
Jump to
- General
- ↳ Guild News
- ↳ General Discussion
- ↳ Administration
- ↳ Public Discussion
- ↳ Representative Discussion
- ↳ Project J'iruna
- ↳ Archives
- ↳ Development Journals
- ↳ Aloys's Journal
- ↳ Chacal's Journal
- ↳ Greypiffle's Journal
- ↳ Grogyan's Journal
- ↳ Electroglyph's Journal
- ↳ Inanna's Journal
- ↳ Jahmen's Journal
- ↳ Jennifer's Journal
- ↳ Kedri's Journal
- ↳ Paradox's Journal
- ↳ Robert's Journal
- ↳ ShadowDude's Journal
- ↳ Whilyam's Journal
- ↳ Zander's Journal
- ↳ Marcello's Journal
- ↳ Pappou's Journal
- ↳ Mar's Journal
- ↳ J'anim's Journal
- ↳ TomahnaGuy's Journal
- ↳ J'etamo's Journal
- ↳ Marein's Journal
- ↳ Zib's Journal
- ↳ AtionSong's Journal
- ↳ Scripting Journal
- ↳ Mystified Explorer's Journal
- ↳ Pryftan's Journal
- ↳ ChaosSong's Journal
- ↳ Singo Berta's Journal
- ↳ Luetwo's Journal
- ↳ Kato's Journal
- ↳ Kellinar's Journal
- ↳ Godot's Journal
- ↳ L. DaVinci's Journal
- ↳ Nek'rahm's Journal
- ↳ Katreeny's Journal
- ↳ ERC Age
- ↳ Genesis
- ↳ Guild Meeting Age
- ↳ In Cavern
- ↳ Role Playing
- ↳ RP Planning
- ↳ Plasma#
- ↳ Pradetsahv
- ↳ Search for the Springs of Kehlbet
- ↳ Uru Library Manager
- ↳ Yinfara
- ↳ UruDistro
- ↳ Ahra Pahts
- ↳ Allgemeine Diskussion auf Deutsch
- ↳ Tips and Showcase
- ↳ Tutorials
- ↳ OHBjection!
- ↳ OHBot
- ↳ BabelBot
- ↳ KI Directory
- ↳ MO:UL Statistics
- ↳ Off-Topic Discussion
- Age Creation
- ↳ Art and Story
- ↳ Building
- ↳ Scripting
- Projects
- ↳ Deep Island
- ↳ Gehn Shard
- ↳ GULP
- ↳ Plasma Development