GetGateInfo
What the server knows of a gate - its kind, cycle, openness and place.
kind is "portcullis", "drawbridge" or "gate" (the Malesov courtyard gate, Trosky’s south gate); cycle is "closed", "opening", "open"
or "closing"; openness walks from 0 (closed) to 1 (open) while a cycle runs; x, y, z is where the gate stands
(metres); openSeconds and closeSeconds are how long a full cycle takes each way (0 = the piece has no clip that way
and a cycle is refused; both 0 for a "gate", which is at the other end at once).
Syntax
Section titled “Syntax”GetGateInfo(key)| Parameter | Type | |
|---|---|---|
key |
string | the gate’s level name |
Returns
Section titled “Returns”table - {kind, cycle, openness, x, y, z, openSeconds, closeSeconds}, or nil for a key that is no gate
Example
Section titled “Example”local gate = GetGateInfo("suchdol_fortres_gate_bars3")if gate and gate.cycle ~= "closed" then SetGateState("suchdol_fortres_gate_bars3", false) endSee also
Section titled “See also”GetGates · SetGateState · the Gates group of the index
