NeuroSignals class in Global context

Signals attached to the neuron.
See also: Signal, WorldSignals, CreatureSignals.
scripts/light.neuro and scripts/seelight.neuro are simple custom neuron examples demonstrating how to send/receive signals between creatures.

8 members:

integer size
integer

size

function add
doesn't return a value

add

function add(string channel)

Create a new signal

function clear
doesn't return a value

clear

function clear()
function get
returns Signal

get

function get(integer index)
function receive
returns float

receive

function receive(string channel)

Receive the aggregated signal power in a given channel.

function receiveFilter
returns float

receive

function receiveFilter(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(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(string channel, float range)

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


Global context