Welcome to the Creatures Wiki! Log in and join the community.

PRT: SEND

From Creatures Wiki
Revision as of 00:58, 6 September 2014 by ScoobyGambit (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

PRT: SEND is a C3/DS CAOS command used in the timer script or activation script of a connectable agent to send a signal from the specified output port to all connected input ports. The signal can be any integer, or a variable such as _p1_.

Documentation[edit]

PRT: SEND (command) id (integer) data (anything)

Send a signal from the specified output port to all connected inputs. The data can be any integer.

Examples[edit]

Timer script of the smell emitter (ov70 is the intensity of smell given off)

*send the intensity you are emitting to the port
*scaled up so that max nearly equals 255
	setv va99 ov70
	mulv va99 50
	prt: send 0 va99
endm