User Tools

Site Tools


touchbound_system:lock_api

Table of Contents

Why?

The idea of the lock api is to allow users of KDC padlocks and keys to integrate them with other scripts in their home, or as part of a public venue.

It all started when I discovered that using llSetScriptState() to pause a script, actually pose a risk of losing its memory, which means losing the key/lock pairing.

As it turns out, if the object changes region, or if the region is restarted, the script's memory will be wiped. So that's why there is an API now.

How?

The lock APi doesn't do a whole lot. I do not want to add ways to completely control the locks remotely because there are certain expectations with using TouchBound products.

All TouchBound locks/keys are sold “modifiable” so you can add a 3rd party script that will then be able to send link messages to the TouchBound script.

SetScriptState

  • Format: llMessageLinked(LINK_SET,<TRUE/FALSE>,“SetScriptState”,“script name”);
  • id: Must be set to the exact name of the script targeted by the command.
  • num: TRUE/FALSE whether the script should run normally or become inactive.

Sending SetScriptState→false will also cancel the pending padlock operation.

SetLockTime

This is only supported by the time-release padlock.

  • Format: llMessageLinked(LINK_SET,<MINUTES>,“SetLockTime”,“script name”);
  • id: Must be set to the exact name of the script targeted by the command.
  • num: The number of minutes to set the timer as.

SetLockTime will ignore the maximum configuration card and the minimum time of 5 minutes (at least 1 minute required). But the hard maximum for the time-release padlock is still 6 hours.

This command will be ignored is SetScriptState is false

touchbound_system/lock_api.txt · Last modified: 2020/05/18 16:50 by kyrahabattoir