I tried to fix it by adding a second button and clickregion, linked to the same SDL file and door animation
and here's my AlcScript:
- Code: Select all
AnimDoor:
animations:
- name: DoorAnim
autostart: 0
loop: 0
DoorButton:
quickscript:
stateanimation:
objectname: AnimDoor
region: ButtonRegion
sdlname: DoorOpen
avatar:
animation: DoorButtonTouch
animtarget: ButtonEmpty
forewards:
animation: DoorAnim
animsound: DoorCreakEmpty
backwards:
animation: DoorAnim
animsound: DoorCreakEmpty
InDoorButton:
quickscript:
stateanimation:
objectname: AnimDoor
region: InButtonRegion
sdlname: DoorOpen
avatar:
animation: DoorButtonTouch
animtarget: InButtonEmpty
forewards:
animation: DoorAnim
animsound: DoorCreakEmpty
backwards:
animation: DoorAnim
animsound: DoorCreakEmpty
However, when I exported it there was a problem. When I try to open the door from the office, it first warps me to the second button (the one on the other side of the door), does the door open animation, warps me back the the first button, and the door re-opens. The same thing happens if I press the button on the other side, or try to close the door. I have a hunch that it has to do with both clickregions/buttons being linked to the same door animation, but I can't be sure.