Hi All,
I created a script to chnge how the doors would behave in my recent game and I thought I would release it into the wild in case anyone needed something similar.
The target door can be set into a number of different states by using the 'activatetarget=X' (or similar) action. Changing X causes the following:
X:10 - auto open/close to any entity
X:20 - open permanently
X:30 - close permanently
X:40 - glitching door
X:50 - auto open/close only to player
X:60 - auto open/close only to everyone but player
X:666- Destroy door
Enjoy:
;Created by Ched 15.04.2011
;Header
;This script allows a door's behaviour to be controled by triggerzones
desc = Controls Door Access
;SETTINGS
;Activated:10 - auto open/close to any entity
;Activated:20 - open permanently
;Activated:30 - close permanently
;Activated:40 - glitching door
;Activated:50 - auto open/close only to player
;Activated:60 - auto open/close only to everyone but player
;Activated:666- Destroy door
;START
:activated=10:state=10
:activated=20:state=20
:activated=30:state=30
:activated=40:state=40
:activated=50:state=50
:activated=60:state=60
:activated=666:destroy
;Auto Open/Close
:state=10,anywithin=75:state=11,setframe=0,sound=$0
:state=11:incframe=0
:state=11,frameatend=0:state=12,coloff
:state=12,anyfurther=100:state=13,sound=$1,colon
:state=13:decframe=0
:state=13,frameatstart=0:state=10,setframe=0
;Open Permanently
:state=20:state=21,setframe=0,sound=$0
:state=21:incframe=0
:state=21,frameatend=0:state=22,coloff
;Close Permanently
:state=30:state=31,sound=$1,colon
:state=31:decframe=0
:state=31,frameatstart=0:state=32,setframe=0
;Glitchy Door
:state=40:etimerstart,state=41
:state=41,etimergreater=1500:state=42,setframe=0,sound=$0
:state=42:incframe=0
:state=42,frameatend=0:state=43,coloff,etimerstart
:state=43,etimergreater=1500:state=44,sound=$1,colon
:state=44:decframe=0
:state=44,frameatstart=0:state=41,setframe=0,etimerstart
;Auto Door player only
:state=50,plrdistwithin=75:state=51,setframe=0,sound=$0
:state=51:incframe=0
:state=51,frameatend=0:state=52,coloff
:state=52,plrdisfurther=100:state=53,sound=$1,colon
:state=53:decframe=0
:state=53,frameatstart=0:state=50,setframe=0
;Auto Door NPC only
:state=60,anywithin=75,plrdisfurther=100:state=61,setframe=0,sound=$0
:state=61:incframe=0
:state=61,frameatend=0:state=62,coloff
:state=62,anyfurther=100:state=63,sound=$1,colon
:state=63:decframe=0
:state=63,frameatstart=0:state=60,setframe=0
;End of Script
[url="http://raptr.com/No_Turn_Right?src=em_forum"]
[/url]