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