User Login
Name
Password
Site Contents
News
About
Download
Scripts
Tutorials
Register
Support
FAQ
Script Reference
New User


Contact Me
Xide
Online Scripting Reference

setSectorParameter

Purpose
Sets a permanent variable in the TWX Database, assigning it to a sector.

Syntax
setSectorParameter {sectorIndex} {parameterName} {value}

{sectorIndex}: The index of the sector to hold the value.

{parameterName}: A name identifying the value to allow it to be retrieved later. This can be anything up to 10 characters long.

{value}: The value to store. This can be anything up to 40 characters long.

Notes
Use this command if you need to store an extra sector-specific value in the database (for example, a notation indicating which sectors belong to an enemy player).

The value assigned to the sector can be any length up to 40 characters. A sector can in theory have any number of values assigned to it. These values can be stored and retrieved from any script that works using the selected database.

Be extremely careful how many values you store against sectors. The method used to store and retrieve these values is not very efficient and will cause performance problems if the search list of total values is too large. A large number of these values can also cause the database to bloat and make it less efficient.

Values can be retrieved using the GetSectorParameter command.

Example
# set the current sector as being enemy territory
setTextLineTrigger getSector :getSector "Sector  : "
pause
:getSector
getWord CURRENTLINE $sector 3
setSectorParameter $sector "Owner" "Enemy"



Return to item listing