Showing posts with label examples. Show all posts
Showing posts with label examples. Show all posts

Saturday, December 28, 2013

CAOS snippets

Learning the CAOS language can be a painful experience.

When you look for command usage examples when debugging your very first CAOS console application, there's not much you can find :
  • The "inst,dde: getb cnam,endm" every single kit, app or example uses as a demo ( it shows current creature's name )
  • Some "cheat codes" to kill creatures, give them full life... always the same ones, and never any further documentation of how they work.
  • Raw CAOS documentation, with very few information on actual syntax, importance of spaces, commas or variables...
Putting it all together can be a tricky process, especially since the early Creatures games are very sensitive to the slightest CAOS script mistake and will mercilessly crash the whole game for a single missing space.

Just so you don't tear your hair out on your early CAOS experiments, here is a list of snippets that do some basic stuff, that you can just copy and paste in your CAOS console or custom app, without wondering if you should use lowercase, uppercase, commas, spaces brackets exactly as in the documentation or not.