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

CABN

From Creatures Wiki
Jump to navigation Jump to search

CABN is a C3 CAOS command used when creating vehicles to mark out the inside of the vehicle, the area that creatures and objects can be carried in.

Syntax[edit]

CABN (command) left (integer) top (integer) right (integer) bottom (integer)

Set a vehicle's cabin rectangle. The cabin is the area in which agents inside the vehicle are kept. The rectangle is relative to the position of the vehicle. The default cabin is the bounding rectangle of part 0. You might want to use ATTR to set attribute Greedy Cabin, on the vehicle. This will make it automatically pick up items which are dropped in the cabin.

Example[edit]

From New lift script:

inst
new: vhcl 3 1 1000 "tuto_new_lifts" 1 0 10
*Open air cabin
attr 512
*Creatures can push and pull
bhvr 3
*Define cabin properties
cabn 0 0 122 151
cabp 50
cabw 10
*ov00 = lift state (0 = still; 1 = moving)
setv ov00 0
*ov01 = current level (starts on bottom)
setv ov01 0
*ov16 = what button you're travelling to
seta ov16 null
*Mark this lift for later
seta va16 targ

*Add gate that keeps creatures in (probably)
pat: dull 1 "tuto_new_lifts" 1 0 0 200
*Add buttons
pat: dull 2 "tuto_new_lifts" 2 90 65 1
*Move to desired location
mvto 74160 71485