Component: Sheep Pen (Scenarios)

From Flowcode Help
Jump to navigationJump to search


Author Matrix TSL
Version 1.0 (Release)
Category Scenarios


Image Sheep Pen component

A simple sheep pen simulation with two gates and two sensors. Allows for simple logical control to try and move all the sheep from one pen to another.

Examples

There is a detailed walk through of the scenario detailed at the link below to go with this component.

Sheep Pen Scenario

Downloadable macro reference

This component does not contain any downloadable macros

Simulation macro reference

ReadSensor

Checks to see if an object is on the Sensor.

Returns 0 if nothing is on the Sensor, Returns 1 if an object is on the Sensor.

Parameters

This macro has no parameters


Return value

BOOL : Returns true if the operation is a success, else false


ControlGateB

Allows gate B to be opened and closed.

Parameters

BOOL State
0 = Closed, 1 = Open


Return value

This call does not return a value


ControlGateA

Allows gate A to be opened and closed.

Parameters

BOOL State
0 = Closed, 1 = Open


Return value

This call does not return a value



Property reference

Inactive Sensor

This property is of type Color picker and can be referenced with the variable name ColA.

Specifies the colour of the sensor's indicator when no sheep are present.


Active Sensor

This property is of type Color picker and can be referenced with the variable name ColB.

Specifies the colour of the sensor's indicator when sheep are present.


Num Objects

This property is of type Fixed list of ints and can be referenced with the variable name NumObjects.

Specifies the number of objects active in the simulation.