Usenet.com

www.Usenet.com

Group Index

Rec Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

[TADS3] dobjFor(Default) action()



I've noticed that when I have a Default action on an object and it has an action method, that method gets called in addition to the normal action method. Is there an automatic way to make the default action override the normal method, or do I have to individually define methods for each verb on my object in order to override the normal method?

For example:

horse:
...
  dobjFor(Default) {
    verify() {}
    action() {
      if (gaveMessage) {
        "There is no horse here. ";
      } else {
        "The horse has already galloped away. ";
        gaveMessage = true;
      }
    }
  }

When I try "kiss horse", I get the message I'm expecting, and I also get "Kissing the horse has no obvious effect. ". I can always go and copy all the defaults from Thing and null them out, but I was hoping there was some built-in way to do this.

Thanks.

-Roger




<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.