Page 3 of 4
Re: [Blender-PyPRP-AlcScript] soundfx isn't playing
Posted: Thu Oct 24, 2019 5:32 am
by Maroonroon
dendwaler wrote:I remember that these weird behaviour is the result of copying objects in blender.
All involved elements have to be set as single user in Blender for each of its properties.
Though nothing can be shared.
So in your case the script is probably fine, but the blendfile not.
ps,
i downloaded your age, but can't look into it before the weekend.
Thank you for you answer, dendwaler.
OK, I now have set all the blend file's objects "single user" (Object Mode -> U, 3 = Object & ObData & Materials+Tex).
Doobes wrote:I noticed in your a.py file that you're importing some of the global scripts such as xAgeSDLBoolToggle and xStandardDoor. No need for that as Cyan has those built in.
OK, import of xAgeSDLBoolToggle and xStandardDoor removed.
Doobes wrote:I noticed, in one place, I used "book" instead of "bool". Oops! It's fixed now.

I noticed in my blend file that I gave the "Avatar" object the property "String -> page_num -> 1"...
There's no Page 1 in that blend file; "Avatar" property updated to "String -> page_num -> 0"
Doobes wrote:- Show Spoiler
[code]Door01:
animations:
- name: Door01Anim
autostart: 0
loop: 0
# loopstart: 0
# loopend: ?
logic:
actions:
- type: pythonfile
tag: DoorOpenClose
pythonfile:
file: xStandardDoor
parameters:
- type: skip
- type: skip
- type: skip
- type: skip
- type: skip
- type: skip
- type: skip
- type: skip
- type: skip
- type: skip
- type: skip
- type: skip
- type: string
- value: Door01OpenClose
- type: region
ref: Door01ExcludeRgn
- type: activator
ref: logicmod:Door01ExtClick_AutoClick
- type: responder
ref: $Door01ExtOpen
- type: activator
ref: logicmod:Door01IntClick_AutoClick02
- type: responder
ref: $Door01IntOpen
- type: bool
value: true
- type: responder
ref: $Door01ExtClose
- type: responder
ref: $Door01IntClose
- type: bool
value: false
- type: skip
- type: bool
value: false
- type: bool
value: true
- type: bool
value: false
- type: skip
- type: responder
tag: Door01ExtOpen
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01ExtOneshot
callbacks:
- marker: TouchButton
receiver: respondermod:$Door01ExtOpen
user: 0
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Anim
cmds:
- setforewards
- continue
waiton: 0
- type: animcmdmsg
params:
receivers:
- 006D:Door01ExtOneshot
animname: Door01ExtOneshotAnim
cmds:
- setforewards
- continue
waiton: 0
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 1
waiton: -1
nextstate: 0
ncallbacks: 1
waittocmd:
- key: 0 #cmds with waiton of 0
msg: 0 #wait for callback for user 0
curstate: 0
ncallbacks: 1
flags:
- detecttrigger
- type: responder
tag: Door01ExtClose
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01ExtOneshot
callbacks:
- marker: TouchButton
receiver: respondermod:$Door01ExtClose
user: 0
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Anim
cmds:
- setbackwards
- continue
waiton: 0
- type: animcmdmsg
params:
receivers:
- 006D:Door01ExtOneshot
animname: Door01ExtOneshotAnim
cmds:
- setbackwards
- continue
waiton: 0
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 1
waiton: -1
nextstate: 0
ncallbacks: 1
waittocmd:
- key: 0 #cmds with waiton of 0
msg: 0 #wait for callback for user 0
curstate: 0
ncallbacks: 1
flags:
- detecttrigger
- type: responder
tag: Door01IntOpen
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01IntOneshot
callbacks:
- marker: TouchButton
receiver: respondermod:$Door01IntOpen
user: 0
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Anim
cmds:
- setforewards
- continue
waiton: 0
- type: animcmdmsg
params:
receivers:
- 006D:Door01ExtOneshot
animname: Door01ExtOneshotAnim
cmds:
- setforewards
- continue
waiton: 0
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 1
waiton: -1
nextstate: 0
ncallbacks: 1
waittocmd:
- key: 0 #cmds with waiton of 0
msg: 0 #wait for callback for user 0
curstate: 0
ncallbacks: 1
flags:
- detecttrigger
- type: responder
tag: Door01IntClose
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01IntOneshot
callbacks:
- marker: TouchButton
receiver: respondermod:$Door01IntClose
user: 0
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Anim
cmds:
- setbackwards
- continue
waiton: 0
- type: animcmdmsg
params:
receivers:
- 006D:Door01ExtOneshot
animname: Door01ExtOneshotAnim
cmds:
- setbackwards
- continue
waiton: 0
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 1
waiton: -1
nextstate: 0
ncallbacks: 1
waittocmd:
- key: 0 #cmds with waiton of 0
msg: 0 #wait for callback for user 0
curstate: 0
ncallbacks: 1
flags:
- detecttrigger
Door01ExtClick:
visual:
render: false
logic:
modifiers:
- tag: AutoClick
cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: Door01ExtRegion
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
actions:
- type: pythonfile
ref: Door01_DoorOpenClose
- type: pythonfile
ref: $ExtStat
actions:
- type: pythonfile
tag: ExtStat
pythonfile:
file: xAgeSDLBoolToggle
parameters:
- type: activator
ref: $AutoClick
- type: string
value: Door01OpenClose
- type: skip
- type: skip
- type: string
value: fromOutside
Door01IntClick:
visual:
render: false
logic:
modifiers:
- tag: AutoClick02
cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: Door01IntRegion
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
actions:
- type: pythonfile
ref: Door01_DoorOpenClose
- type: pythonfile
ref: $IntStat
actions:
- type: pythonfile
tag: IntStat
pythonfile:
file: xAgeSDLBoolToggle
parameters:
- type: activator
ref: $AutoClick02
- type: string
value: Door01OpenClose
- type: skip
- type: skip
- type: string
value: fromInside
Door01ExtOneshot:
animations:
- name: Door01ExtOneshotAnim
autostart: 0
loop: 0
# loopstart: 0
# loopend: ?
logic:
actions:
- type: oneshot
name: Door01ExtOneshot
oneshot:
animation: ButtonTouch
Door01IntOneshot:
logic:
actions:
- type: oneshot
name: Door01IntOneshot
oneshot:
animation: ButtonTouch
Door01Sound:
type: soundemit
sound:
flags:
- localsound
- is3dsound
file: psnlHutDoorOpenClose
volume: 1
type: soundfx
minfdist: 50
maxfdist: 150[/code]
So:
- The blend file's objects are now "single user", the "book" became a "bool", and the "Avatar" object's "page_num" property have been updated.
- The import of xAgeSDLBoolToggle and xStandardDoor have been removed from the "a.py" file and the "a.pak" file have been updated.
Sadly, same result.
Re: [Blender-PyPRP-AlcScript] soundfx isn't playing
Posted: Thu Oct 24, 2019 5:56 am
by dendwaler
i noticed one other thing, i am not able to try it yet because i only have installed 2.8 at the moment.
The regions!
Do not overlap regions ! the exclude regions does overlap both other regions.
It must be between the regions.
its also a "sharing" problem, regions must be adjacent or fully including another region.
and not relevant for the current problem,
I noticed, you use double sided texturing.
only use single sided and texture on the side from which the normal is pointing.(normal orthogonal to texture)
Therefore a room, most of the time needs an outside and an inside wall. or simply use a cube for a wall, there is no need to remove top or bottom or any sides,
because its the number of vertices that counts not the number of faces.
Re: [Blender-PyPRP-AlcScript] soundfx isn't playing
Posted: Thu Oct 24, 2019 8:34 am
by Maroonroon
dendwaler wrote:Do not overlap regions ! the exclude regions does overlap both other regions.
It must be between the regions.
its also a "sharing" problem, regions must be adjacent or fully including another region.
Thank you, I forgot about that; I'll try.
dendwaler wrote:I noticed, you use double sided texturing.
only use single sided and texture on the side from which the normal is pointing.(normal orthogonal to texture)
In the "Buttons Window", the "Double Sided" button of "Editing" is down by default, but anyway, the textures are always rendered "Single Sided" on my computer... I don't know why.
I'll also try to up this button, thank you.
dendwaler wrote:Therefore a room, most of the time needs an outside and an inside wall. or simply use a cube for a wall, there is no need to remove top or bottom or any sides,
because its the number of vertices that counts not the number of faces.
I know it, but I was thinking that removing useless faces could help loading an Age faster, or making less lag, or, this kind of things; giving more in game performances... So, I was wrong?
I'll try again with those informations and edit this post if there isn't any other post before I come back.
EDIT: Sadly, same result.
EDIT 2: I found something in the AlcScrit, I'm looking at it...
Re: [Blender-PyPRP-AlcScript] soundfx isn't playing
Posted: Thu Oct 24, 2019 11:39 am
by Doobes
The AlcScript in your latest post still shows the old code I gave you with my unfortunate typo. Did you try the new version?
- Show Spoiler
[code]Door01:
animations:
- name: Door01Anim
autostart: 0
loop: 0
# loopstart: 0
# loopend: ?
logic:
actions:
- type: pythonfile
tag: DoorOpenClose
pythonfile:
file: xStandardDoor
parameters:
- type: skip
- type: skip
- type: skip
- type: skip
- type: skip
- type: skip
- type: skip
- type: skip
- type: skip
- type: skip
- type: skip
- type: skip
- type: string
- value: Door01OpenClose
- type: region
ref: Door01ExcludeRgn
- type: activator
ref: logicmod:Door01ExtClick_AutoClick
- type: responder
ref: $Door01ExtOpen
- type: activator
ref: logicmod:Door01IntClick_AutoClick02
- type: responder
ref: $Door01IntOpen
- type: bool
value: true
- type: responder
ref: $Door01ExtClose
- type: responder
ref: $Door01IntClose
- type: bool
value: false
- type: skip
- type: bool
value: false
- type: bool
value: true
- type: bool
value: false
- type: skip
- type: responder
tag: Door01ExtOpen
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01ExtOneshot
callbacks:
- marker: TouchButton
receiver: respondermod:$Door01ExtOpen
user: 0
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Anim
cmds:
- setforewards
- continue
waiton: 0
- type: animcmdmsg
params:
receivers:
- 006D:Door01ExtOneshot
animname: Door01ExtOneshotAnim
cmds:
- setforewards
- continue
waiton: 0
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 1
waiton: -1
nextstate: 0
ncallbacks: 1
waittocmd:
- key: 0 #cmds with waiton of 0
msg: 0 #wait for callback for user 0
curstate: 0
ncallbacks: 1
flags:
- detecttrigger
- type: responder
tag: Door01ExtClose
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01ExtOneshot
callbacks:
- marker: TouchButton
receiver: respondermod:$Door01ExtClose
user: 0
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Anim
cmds:
- setbackwards
- continue
waiton: 0
- type: animcmdmsg
params:
receivers:
- 006D:Door01ExtOneshot
animname: Door01ExtOneshotAnim
cmds:
- setbackwards
- continue
waiton: 0
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 1
waiton: -1
nextstate: 0
ncallbacks: 1
waittocmd:
- key: 0 #cmds with waiton of 0
msg: 0 #wait for callback for user 0
curstate: 0
ncallbacks: 1
flags:
- detecttrigger
- type: responder
tag: Door01IntOpen
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01IntOneshot
callbacks:
- marker: TouchButton
receiver: respondermod:$Door01IntOpen
user: 0
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Anim
cmds:
- setforewards
- continue
waiton: 0
- type: animcmdmsg
params:
receivers:
- 006D:Door01ExtOneshot
animname: Door01ExtOneshotAnim
cmds:
- setforewards
- continue
waiton: 0
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 1
waiton: -1
nextstate: 0
ncallbacks: 1
waittocmd:
- key: 0 #cmds with waiton of 0
msg: 0 #wait for callback for user 0
curstate: 0
ncallbacks: 1
flags:
- detecttrigger
- type: responder
tag: Door01IntClose
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01IntOneshot
callbacks:
- marker: TouchButton
receiver: respondermod:$Door01IntClose
user: 0
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Anim
cmds:
- setbackwards
- continue
waiton: 0
- type: animcmdmsg
params:
receivers:
- 006D:Door01ExtOneshot
animname: Door01ExtOneshotAnim
cmds:
- setbackwards
- continue
waiton: 0
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 1
waiton: -1
nextstate: 0
ncallbacks: 1
waittocmd:
- key: 0 #cmds with waiton of 0
msg: 0 #wait for callback for user 0
curstate: 0
ncallbacks: 1
flags:
- detecttrigger
Door01ExtClick:
visual:
render: false
logic:
modifiers:
- tag: AutoClick
cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: Door01ExtRegion
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
actions:
- type: pythonfile
ref: Door01_DoorOpenClose
- type: pythonfile
ref: $ExtStat
actions:
- type: pythonfile
tag: ExtStat
pythonfile:
file: xAgeSDLBoolToggle
parameters:
- type: activator
ref: $AutoClick
- type: string
value: Door01OpenClose
- type: skip
- type: skip
- type: string
value: fromOutside
Door01IntClick:
visual:
render: false
logic:
modifiers:
- tag: AutoClick02
cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: Door01IntRegion
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
actions:
- type: pythonfile
ref: Door01_DoorOpenClose
- type: pythonfile
ref: $IntStat
actions:
- type: pythonfile
tag: IntStat
pythonfile:
file: xAgeSDLBoolToggle
parameters:
- type: activator
ref: $AutoClick02
- type: string
value: Door01OpenClose
- type: skip
- type: skip
- type: string
value: fromInside
Door01ExtOneshot:
animations:
- name: Door01ExtOneshotAnim
autostart: 0
loop: 0
# loopstart: 0
# loopend: ?
logic:
actions:
- type: oneshot
name: Door01ExtOneshot
oneshot:
animation: ButtonTouch
Door01IntOneshot:
logic:
actions:
- type: oneshot
name: Door01IntOneshot
oneshot:
animation: ButtonTouch
Door01Sound:
type: soundemit
sound:
flags:
- localsound
- is3dsound
file: psnlHutDoorOpenClose
volume: 1
type: soundfx
minfdist: 50
maxfdist: 150[/code]
Re: [Blender-PyPRP-AlcScript] soundfx isn't playing
Posted: Thu Oct 24, 2019 1:48 pm
by Maroonroon
Doobes wrote:The AlcScript in your latest post still shows the old code I gave you with my unfortunate typo. Did you try the new version?
Oops sorry, I've copy/paste the wrong thing in the wrong place... :p
Yes I tryed the new version and removed the "-" in "- value: Door01OpenClose".

I also extracted the "xStandardDoor.py" and took a look at it to know what the parameters was for; I then saw that you reversed the Ext" and "Int" parameters.
Next, I changed the name "Door01OpenClose" to "Door01Closed", and set the "VAR BOOL Door01Closed[1]" to "DEFAULT=1"; both to match the behavior of the "xStandardDoor.py" parameters.
Finaly, I updated the "a.py", "a.pak" and "a.blend" files.
IT WORKS! (Kind of...) Both of the buttons works, the sound is played, the door opens/closes, and the door state is saved.
BUT, each time I click on a button, I have to "/link a" to be able to click again on a button; because the buttons are no longer clickable when one of them have been clicked.
Re: [Blender-PyPRP-AlcScript] soundfx isn't playing
Posted: Fri Oct 25, 2019 12:17 am
by Deledrius
Maroonroon wrote:
I also extracted the "xStandardDoor.py" and took a look at it to know what the parameters was for; I then saw that you reversed the Ext" and "Int" parameters.

No need to do all that! I already did the work to document as many of the global scripts as I could:
https://guildofwriters.org/wiki/Global_ ... ndard_Door
I haven't yet added AlcScript examples to all of them, though, mostly because it's not needed in Korman.

Re: [Blender-PyPRP-AlcScript] soundfx isn't playing
Posted: Fri Oct 25, 2019 2:55 am
by Maroonroon
Re: [Blender-PyPRP-AlcScript] soundfx isn't playing
Posted: Tue Oct 29, 2019 5:10 am
by Maroonroon
I still have to find why the buttons are no longer clickable when one of them have been clicked...
- Book: Show Spoiler
[code]age:
sequenceprefix: 281
daylength: 24.0
maxcapacity: 10
starttime: 0
lingertime: 180
pages:
- index: 0
name: mainRoom
config:
agesdlhook: true[/code]
- AlcScript: Show Spoiler
[code]Door01:
animations:
- name: Door01Anim
autostart: 0
loop: 0
# loopstart: 0
# loopend: ?
logic:
actions:
- type: pythonfile
tag: DoorOpenClose
pythonfile:
file: xStandardDoor
parameters:
- type: skip
- type: skip
- type: skip
- type: skip
- type: skip
- type: skip
- type: skip
- type: skip
- type: skip
- type: skip
- type: skip
- type: skip
- type: string
value: Door01Closed
- type: region
ref: Door01ExcludeRgn
- type: activator
ref: logicmod:Door01IntClick_AutoClick
- type: responder
ref: $Door01IntOpen
- type: activator
ref: logicmod:Door01ExtClick_AutoClick
- type: responder
ref: $Door01ExtOpen
- type: bool
value: true
- type: responder
ref: $Door01IntClose
- type: responder
ref: $Door01ExtClose
- type: bool
value: false
- type: skip
- type: bool
value: false
- type: bool
value: false
- type: bool
value: false
- type: bool
value: true
- type: responder
tag: Door01IntOpen
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01IntOneshot
callbacks:
- marker: TouchButton
receiver: respondermod:$Door01IntOpen
user: 0
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Anim
cmds:
- setforewards
- continue
waiton: 0
- type: animcmdmsg
params:
receivers:
- 006D:Door01ExtOneshot
animname: Door01ExtOneshotAnim
cmds:
- setforewards
- continue
waiton: 0
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 1
waiton: -1
nextstate: 0
waittocmd:
- key: 0 #cmds with waiton of 0
msg: 0 #wait for callback for user 0
curstate: 0
flags:
- detecttrigger
- type: responder
tag: Door01ExtOpen
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01ExtOneshot
callbacks:
- marker: TouchButton
receiver: respondermod:$Door01ExtOpen
user: 0
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Anim
cmds:
- setforewards
- continue
waiton: 0
- type: animcmdmsg
params:
receivers:
- 006D:Door01ExtOneshot
animname: Door01ExtOneshotAnim
cmds:
- setforewards
- continue
waiton: 0
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 1
waiton: -1
nextstate: 0
waittocmd:
- key: 0 #cmds with waiton of 0
msg: 0 #wait for callback for user 0
curstate: 0
flags:
- detecttrigger
- type: responder
tag: Door01IntClose
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01IntOneshot
callbacks:
- marker: TouchButton
receiver: respondermod:$Door01IntClose
user: 0
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Anim
cmds:
- setbackwards
- continue
waiton: 0
- type: animcmdmsg
params:
receivers:
- 006D:Door01ExtOneshot
animname: Door01ExtOneshotAnim
cmds:
- setbackwards
- continue
waiton: 0
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 1
waiton: -1
nextstate: 0
waittocmd:
- key: 0 #cmds with waiton of 0
msg: 0 #wait for callback for user 0
curstate: 0
flags:
- detecttrigger
- type: responder
tag: Door01ExtClose
responder:
states:
- cmds:
- type: oneshotmsg
params:
receivers:
- oneshotmod:Door01ExtOneshot
callbacks:
- marker: TouchButton
receiver: respondermod:$Door01ExtClose
user: 0
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:Door01
animname: Door01Anim
cmds:
- setbackwards
- continue
waiton: 0
- type: animcmdmsg
params:
receivers:
- 006D:Door01ExtOneshot
animname: Door01ExtOneshotAnim
cmds:
- setbackwards
- continue
waiton: 0
- type: soundmsg
params:
receivers:
- 0011:Door01Sound
cmds:
- play
- setvolume
volume: 1
waiton: -1
nextstate: 0
waittocmd:
- key: 0 #cmds with waiton of 0
msg: 0 #wait for callback for user 0
curstate: 0
flags:
- detecttrigger
Door01ExtClick:
visual:
render: false
logic:
modifiers:
- tag: AutoClick
cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: Door01ExtRegion
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
actions:
- type: pythonfile
ref: Door01_DoorOpenClose
- type: pythonfile
ref: $ExtStat
actions:
- type: pythonfile
tag: ExtStat
pythonfile:
file: xAgeSDLBoolToggle
parameters:
- type: activator
ref: $AutoClick
- type: string
value: Door01Closed
- type: skip
- type: skip
- type: string
value: fromOutside
Door01IntClick:
visual:
render: false
logic:
modifiers:
- tag: AutoClick
cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: Door01IntRegion
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
actions:
- type: pythonfile
ref: Door01_DoorOpenClose
- type: pythonfile
ref: $IntStat
actions:
- type: pythonfile
tag: IntStat
pythonfile:
file: xAgeSDLBoolToggle
parameters:
- type: activator
ref: $AutoClick
- type: string
value: Door01Closed
- type: skip
- type: skip
- type: string
value: fromInside
Door01ExtOneshot:
animations:
- name: Door01ExtOneshotAnim
autostart: 0
loop: 0
# loopstart: 0
# loopend: ?
logic:
actions:
- type: oneshot
name: Door01ExtOneshot
oneshot:
animation: ButtonTouch
Door01IntOneshot:
logic:
actions:
- type: oneshot
name: Door01IntOneshot
oneshot:
animation: ButtonTouch
Door01Sound:
type: soundemit
sound:
flags:
- localsound
- is3dsound
file: psnlHutDoorOpenClose
volume: 1
type: soundfx
minfdist: 50
maxfdist: 150
ExtCamera:
camera:
brain:
type: fixed
xpanlimit: 0.8
zpanlimit: 0.8
poa: 0,0,3
ExtCameraRegion:
region:
type: camera
camera:
messages:
- newcam: ExtCamera
IntCamera:
camera:
brain:
type: fixed
xpanlimit: 0.8
zpanlimit: 0.8
poa: 0,0,0
IntCameraRegion:
region:
type: camera
camera:
messages:
- newcam: IntCamera[/code]
- a.py: Show Spoiler
[code]from Plasma import *
from PlasmaTypes import *
gPages = [
'FemaleSwimDockExit',
'MaleSwimDockExit']
#Note: Change all "ptResponder" to "ptModifier" for a Modifier class
class a(ptResponder):
def __init__(self):
ptResponder.__init__(self)
self.id = 281000
self.version = 1
PtPageInNode(gPages)
def OnFirstUpdate(self):
pass
def OnServerInitComplete(self):
sdl = PtGetAgeSDL()
sdl.setFlags('Door01Closed', 1, 1)
sdl.sendToClients('Door01Closed')
sdl.setNotify(self.key, 'Door01Closed', 0.0)
def OnNotify(self, state, id, events):
pass
def OnSDLNotify(self, VARname, SDLname, playerID, tag):
if SDLname != 'a':
print 'SDLname =', SDLname, ', not a'
elif VARname == 'Door01Closed':
ageSDL = PtGetAgeSDL()
getSDL = ageSDL[VARname][0]
def __del__(self):
for page in gPages:
PtPageOutNode(page)
#Python Glue[...][/code]
- a.sdl: Show Spoiler
[code]STATEDESC a
{
VERSION 1
## Age Mechanics
VAR BOOL Door01Closed[1] DEFAULT=1
}[/code]
Previous attachment removed -> updated here.
Re: [Blender-PyPRP-AlcScript] soundfx isn't playing
Posted: Tue Oct 29, 2019 5:40 am
by Dulcamara
Is it possible to send the Blendfile? I often have had the same problem. Maybe i find the error in it.
Greetings
Dulcamara
Re: [Blender-PyPRP-AlcScript] soundfx isn't playing
Posted: Tue Oct 29, 2019 6:08 am
by Maroonroon
Dulcamara wrote:Is it possible to send the Blendfile? I often have had the same problem. Maybe i find the error in it.
Greetings
Dulcamara
Hello Dulcamara.
The file is inside the attachment of my previous post; but I think that you saw it after sending your post, as it have been doawloaded.
