A complete solution to create custom doors.
Requires DataManager!
Simply use /dfw (configurable) to receive instructions on how to use this script.
You can find the configuration file in server/data/custom/__config_DoorFramework.json.
cmdStaffRankrank necessary to use the command.1by default (moderator).collisionwhether doors should have collision.trueby default.cmdcommand name to be used."dfw"by default.soundsound to be used if none was specified for/dfw sound."fx/doorw1.wav"by default.
You can also use this as an API to make doors in your own scripts.
DoorFramework.createRecord(
recordId,id used in other functions
name,text displayed on the door
model,path to the mesh for the door's appearance
cellDescription,cell to which the door leads
location,location to which the door leads. Must haveposX,posY,posZ,rotX,rotZ
soundsound to be played when the door is activated
)DoorFramework.getRecord(recordId)
returns{
refId,refIdgenerated for the door record in miscellaneous record store
location,location given increateRecord
cellDescription,cell given increateRecord
soundsound given increateRecord
}DoorFramework.removeRecord(recordId)
removes the record. Doesn't despawn all the door instances or remove the generated custom record!DoorFramework.spawnDoor(
recordId,
cellDescription,cell in which to spawn the door (should be loaded)
locationlocation at which to spawn the door
)DoorFramework.isDoor(refId)
returns whether a givenrefIdis used by the DoorFrameworkDoorFramework.getDoor(refId)
returns therecordIdof the door withrefIdDoorFramework.useDoor(pid, recordId)
makes the player withpiduse the door withrecordId. Normally is automatically called when a player activates the door.