Page 1 of 4
[Blender-PyPRP-AlcScript] soundfx isn't playing
Posted: 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
[code]Door01Close01:
logic:
modifiers:
- cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: Door01Close01Rgn
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
actions:
- type: responder
ref: :Door01Close01Rspndr
actions:
- type: responder
name: Door01Close01Rspndr
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01Close01SeekPt
callbacks:
- marker: ButtonTouch
receiver: respondermod:Door01Close01Rspndr
user: 0
waiton: -1
- type: soundmsg
params:
receivers:
- 0011:Door01Close01Sound
cmds:
- play
- setvolume
volume: 0.8
waiton: 0
nextstate: 0
waittocmd:
- key: 0
msg: 0
curstate: 0
flags:
- detecttrigger
Door01Close01SeekPt:
logic:
actions:
- type: oneshot
name: Door01Close01SeekPt
oneshot:
animation: ButtonTouch
Door01Close01Sound:
type: soundemit
sound:
flags:
- localonly
- is3dsound
minfdist: 15
maxfdist: 30
file: clftDoor_Button
volume: 0.8
type: soundfx[/code]
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
Posted: 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.
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
Posted: 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
[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
Posted: 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
Posted: 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
[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]
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
Posted: 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
[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]
In your script i see only the ref:
Door01OpenClose
WOW what a long long script

Re: [Blender-PyPRP-AlcScript] soundfx isn't playing
Posted: 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
Posted: 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
[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]
Re: [Blender-PyPRP-AlcScript] soundfx isn't playing
Posted: 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
Posted: 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.


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