WorldSignals class in Global context

Use this object to create stationary signals, not associated with any moving object and receive signals from any location in the world. There are Creature and Neuro-based variants of this object that automatically operate from the creature's or neuron's position.

See also: Signal

8 members:

integer size
integer

Signal count

Number of signals in this set.

function add
returns Signal

add

function add(XYZ position, string channel)

Create a new signal

function clear
doesn't return a value

clear

function clear()

Delete all signals

function get
returns Signal

get

function get(integer index)

Access individual signals (index=0 .. size-1)

function receive
returns float

receive

function receive(XYZ position, string channel)

Receive the aggregated signal power in a given channel.

function receiveFilter
returns float

receive

function receiveFilter(XYZ position, string channel, float max_distance, float flavor, float filter)

Receive the aggregated signal power in a given channel.

Additional filtering options:
- Max distance only receives the neighbor signals (based on their physical location)
- Flavor filtering: only signals having the flavor close to the specified one will be received. The filter value is the maximum allowed difference.

function receiveSet
returns Vector

receive

function receiveSet(XYZ position, string channel, float max_distance)

Get all signals in the specified range. Returns a readonly vector object containing Signal objects (individual signals can be accessed as result[0] throught result[result.size-1]).

function receiveSingle
returns Signal

receive

function receiveSingle(XYZ position, string channel, float max_distance)

Find the signal source having the highest signal power (including the distance)


Global context