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: Select all
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
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.