Config

Explanation of the config structure

Parameter
Meaning
Values

notificationIcon

Path to the icon used in the notification

string

sendNotificationToAll

Flag whether to send a notification to all players upon unlocking

1 / 0 in string format

isAlarmed

Flag whether to play alarm sound on the object.

1 / 0 in string format

actionText

Text showing on the contextual action tooltip when holding the key

string

notificationText

Actual text shown in the notification

string

sendNotificationToClient

Flag whether to send a notification to the client actor

1 / 0 in string format

notificationHeader

Text of the notification header

string

alarmSound

Sound set of the sound being played upon unlocking. If the isAlarmed is set to "1"

string

unlockTime

Duration of the unlocking process

integer value in string

Keys

If you want to setup multiple keys for the doors, you can specify multiple class types of the keys.

It's very important to inherit from class - CRDTN_Key_Base

{
    "m_DoorConfig": {
        "Land_Mil_Barracks4": [
            {
                "DoorIndex": 3,
                "BuildingPosition": [
                    -1,
                    -1,
                    -1
                ],
                "BuildingClassname": "Land_Mil_Barracks4",
                "KeyClassnames": [
                    "CRDTN_Key_Universal"
                ],
                "Data": {
                    "notificationIcon": "set:ccgui_enforce image:MapUserMarker",
                    "sendNotificationToAll": "0",
                    "isAlarmed": "1",
                    "actionText": "Unlock with key",
                    "notificationText": "Door unlocked",
                    "sendNotificationToClient": "0",
                    "notificationHeader": "ALERT",
                    "alarmSound": "CRDTN_Core_SoundSet_Sound_Alarm",
                    "unlockTime": "10"
                }
            }
        ]
    }
}

This config file setup all the military buildings of type Land_Mil_Barracks4 and its door on the index 3 to be locked. You can use only CRDTN_Key_Universal to unlock.

Last updated