" />

CAOS Questions: Doif Statement Conditions

A Question of Creatures CAOSThe wonderful thing about CAOS is that it is pretty well documented in the Official Creatures CAOS Guide. The trouble? It’s only “pretty well” documented! I finished up the last fix in my updates for the Creatures 1 carrot… And then decided to try and throw in one more tiny surprise! I thought I had it all figured out, only it didn’t work out too well. Since I received such wonderful feedback when I posted a few CAOS problems, I decided to reach out to the Creatures community again! Any help untangling this issue would be most appreciated, as always. I’m still learning lots of new things!

CAOS Doif Statement Conditions

This is a complete list of conditions that doif statements will accept. What I’m trying to figure out is what each one means and how to implement it when choosing the pose to use from a sprite file. This table contains my own interpretations, and will be updated. I will also post a more definitive guide in a new post to clearly show the correct definitions! For the examples, assume that the sprite file contains 8 poses labeled 0, 1, 2, 3, 4, 5, 6, and 7.

Condition Meaning Example
EQ Equals doif pose eq 5
Do if the pose equals 5
True for pose 5
NE Not Equal to doif pose ne 5
Do if the pose does not equal 5
True for poses 0, 1, 2, 3, 4, 6, and 7
GT Greater Than doif pose gt 5
Do if the pose is greater than 5
True for poses 6 and 7
LT Less Than doif pose lt 5
Do if the pose is less than 5
True for poses 0, 1, 2, 3, and 4
GE Greater Than or Equal to doif pose ge 5
Do if the pose is greater than or equal to 5
True for poses 5, 6, and 7
LE Less Than or Equal to doif pose le 5
Do if the pose is less than or equal to 5
True for poses 0, 1, 2, 3, 4, and 5
BT ??? Unknown
BF ??? Unknown

Getting a Few CAOS AnswersI though that BT and BF might indicate something along the lines of between, but I’m not sure if there’s a way to define variables in that way. I have doif statements that involve less than and greater than, yet there is one pose I’m trying to use that is used completely differently. Poses 0-4 represent the growth stages, pose 5 represents the full grown carrot, and poses 6-7 represent the dropped carrots (pointing in either direction). What I would love to do is to define a doif statement defining the pose numbers that it must be between. If there is a way to accomplish that task, I would be very interested to learn about it! The CAOS code “doif pose bt 6 7” seemed like a good attempt to define the minimum and maximum poses, but that created a lovely macro error. Hopefully someone has an idea!

6 Comments
« Previous Post | Next Post »