<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://developer.vellocetsoftware.com/index.php?action=history&amp;feed=atom&amp;title=Vertex%2FVSig</id>
	<title>Vertex/VSig - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://developer.vellocetsoftware.com/index.php?action=history&amp;feed=atom&amp;title=Vertex%2FVSig"/>
	<link rel="alternate" type="text/html" href="https://developer.vellocetsoftware.com/w/index.php?title=Vertex/VSig&amp;action=history"/>
	<updated>2026-10-21T20:39:27Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://developer.vellocetsoftware.com/w/index.php?title=Vertex/VSig&amp;diff=254&amp;oldid=prev</id>
		<title>DocumentationBot: Version 1</title>
		<link rel="alternate" type="text/html" href="https://developer.vellocetsoftware.com/w/index.php?title=Vertex/VSig&amp;diff=254&amp;oldid=prev"/>
		<updated>2026-10-01T04:13:05Z</updated>

		<summary type="html">&lt;p&gt;Version 1&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{VertexNav}}&lt;br /&gt;
&lt;br /&gt;
VSig connects events to actions in a map. Use it for triggers, doors, timers, and reusable map logic. The game SDK supplies the available entity classes and game events.&lt;br /&gt;
&lt;br /&gt;
== Open the map script ==&lt;br /&gt;
&lt;br /&gt;
Save a map with a game connection. Vertex creates and associates a companion &amp;lt;code&amp;gt;&amp;amp;lt;map_name&amp;amp;gt;.vsig&amp;lt;/code&amp;gt; when no entry script is selected. Choose &amp;#039;&amp;#039;&amp;#039;Code → Map script&amp;#039;&amp;#039;&amp;#039; to open it. Use &amp;#039;&amp;#039;&amp;#039;Map → Choose map script…&amp;#039;&amp;#039;&amp;#039; to select an existing entry file.&lt;br /&gt;
&lt;br /&gt;
Keep shared &amp;lt;code&amp;gt;.vsiglib&amp;lt;/code&amp;gt; files under the same source folder. &amp;#039;&amp;#039;&amp;#039;More → New source…&amp;#039;&amp;#039;&amp;#039; in Code creates another file there; creating it does not make it the map&amp;#039;s entry script.&lt;br /&gt;
&lt;br /&gt;
The Code workspace checks syntax and bindings using the current map and SDK. A successful build performs the final validation and embeds the compiled program. Save scripts regularly: map recovery does not recover unsaved script edits.&lt;br /&gt;
&lt;br /&gt;
== Events and actions ==&lt;br /&gt;
&lt;br /&gt;
A handler starts with &amp;lt;code&amp;gt;on source.event:&amp;lt;/code&amp;gt;. Indented lines beneath it run when that event occurs. A &amp;lt;code&amp;gt;ref&amp;lt;/code&amp;gt; binds a short alias to an authored entity by class and hierarchy path.&lt;br /&gt;
&lt;br /&gt;
The game&amp;#039;s entity reference defines valid inputs and outputs. For a complete trigger-to-door example, see [[Grimwar/VSig]]. A different game&amp;#039;s SDK may use different class and signal names.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Inputs&amp;#039;&amp;#039;&amp;#039; are actions a script calls. &amp;#039;&amp;#039;&amp;#039;Outputs&amp;#039;&amp;#039;&amp;#039; are events it listens to. Properties read a running entity&amp;#039;s state. A ref can match several objects for broadcast actions, but a property read needs one unambiguous object.&lt;br /&gt;
&lt;br /&gt;
== Values and reusable logic ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;const&amp;lt;/code&amp;gt; for a fixed value, &amp;lt;code&amp;gt;var&amp;lt;/code&amp;gt; for map state, and &amp;lt;code&amp;gt;state&amp;lt;/code&amp;gt; inside a reusable module. Primitive types are &amp;lt;code&amp;gt;bool&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;float&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt;. Quote strings and indent blocks consistently.&lt;br /&gt;
&lt;br /&gt;
VSig includes twelve standard logic modules: &amp;lt;code&amp;gt;counter&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;accumulator&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;relay&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;timer&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;selector&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;random_selector&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;sequence&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;latch&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;toggle&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;state_machine&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;debounce&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;cooldown&amp;lt;/code&amp;gt;. Use them directly; no library file or import is needed. These modules also work in existing Unity-authored maps that were made without Vertex.&lt;br /&gt;
&lt;br /&gt;
This complete script creates a counter instance and increments it once when the map is ready:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
scene &amp;quot;Counter example&amp;quot;&lt;br /&gt;
&lt;br /&gt;
use counter as visits(max_value = 100)&lt;br /&gt;
&lt;br /&gt;
once on map.ready:&lt;br /&gt;
    visits.add&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each instance has its own state. Give every instance a unique alias. See [[Grimwar/VSig reference#Standard logic library|the standard module reference]] for parameters, inputs, and outputs.&lt;br /&gt;
&lt;br /&gt;
For custom behavior, declare a module or import one from a companion &amp;lt;code&amp;gt;.vsiglib&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
module visit_tracker(start: int = 0):&lt;br /&gt;
    state value: int = start&lt;br /&gt;
    output changed(value: int)&lt;br /&gt;
&lt;br /&gt;
    input add(amount: int = 1):&lt;br /&gt;
        value = value + amount&lt;br /&gt;
        emit changed(value)&lt;br /&gt;
&lt;br /&gt;
use visit_tracker as visits&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Move that module declaration into &amp;lt;code&amp;gt;Counters.vsiglib&amp;lt;/code&amp;gt; to share it, then import and instantiate it with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
from &amp;quot;Counters.vsiglib&amp;quot; use visit_tracker&lt;br /&gt;
use visit_tracker as visits(start = 2)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explicitly declared or imported modules take precedence over built-in modules with the same name. Existing imports of &amp;lt;code&amp;gt;Logic.vsiglib&amp;lt;/code&amp;gt;, including the old SDK and Vertex package paths, remain supported. Custom library imports still resolve within the captured source files. A game may also supply a library through an SDK asset or prefab; its documentation explains how to bind that library.&lt;br /&gt;
&lt;br /&gt;
== Timing and authority ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;wait 250ms&amp;lt;/code&amp;gt; pauses the current execution chain. A named &amp;lt;code&amp;gt;schedule&amp;lt;/code&amp;gt; runs delayed or repeating work and can be cancelled. Reusing a schedule name replaces the existing work. Cancel round-specific timers when the round ends.&lt;br /&gt;
&lt;br /&gt;
Handlers use server authority by default. Prefix a handler with &amp;lt;code&amp;gt;client&amp;lt;/code&amp;gt; for a presentation action whose entity contract allows client access. A client handler cannot grant itself server access.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;map.ready&amp;lt;/code&amp;gt; is the standard startup event. Other events, allowed commands, multiplayer rules, and entity behavior belong to the game SDK. They are not available just because a script uses their names.&lt;br /&gt;
&lt;br /&gt;
[[Category:Vertex]] [[Category:VSig]]&lt;/div&gt;</summary>
		<author><name>DocumentationBot</name></author>
	</entry>
</feed>