Colobot Wiki
Advertisement

Syntax:

receive ( name, power );

Retrieves an information from the closest information exchange post.

name: string[]

Name of the information required from the exchange post. This name is a string: it must be written in quotation marks "".

power: float[]

Power of the receiver, which corresponds to maximal distance between the receiver and the exchange post. If the distance is longer, no information is received. Default value is 10 meters.

Return value: float[]

Value of the retrieved information. If no exchange post is close enough, or if the name of the requested information does not exist in the exchange post, the value NaN is returned.

Advertisement