Thursday, September 16, 2010

Chocolaty Addendum.

So in the tutorial I released, I had the reader make a very basic vendor that did only as much as getting the job done.  But there are a lot of little things, finishing touches, if you will, that could still be done!

Here’s a quick list of them with code examples.

  • Drop sounds.  That nice “thud” that comes from dropping an agent.

      scrp 2 23 9000 6
          sndc "drop"
          wait 5

      scrp 2 11 9000 6
          sndc "dr10"
          wait 5

  • Different chemicals from eating the bar. Fat, sugar.

      scrp 2 11 9000 12
          stim writ from 79 1
          sndc "chwp"
          doif pose eq 0
              pose 1
          elif pose eq
              kill ownr

      targ from

      chem 10 .25
      3 .25


  • A stimulus for “pushing” the vendor, to encourage Norns to do it, placed in the Activate 1 script.

    • stim writ from 90 1
  • And I also didn’t go over Commenting.  Anything you put after a * sign is a comment. So for instance, you can say:

    • *inject .25 fat
      chem 10 .25
      *inject .25 sugar
      chem 3 .25

It can be very helpful in organizing your script. :)

Hopefully you all can use these things. :)  If you ever don’t understand something, just try looking it up in the CAOS Documentation, and if you still don’t get it, ask about it here or here.


  1. Thanks for this tutorial, it was a big help and the push I needed to get into creatures development. You do great work and it is greatly appreciated

  2. Are you going to post the vendor?

  3. How would you go about making it a 'smart' vendor, not vending more items if there are already lots of bars of chocolate on the floor going uneaten?