[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tads3] Hints Suggestion
- From: "Mike Roberts" <mjr_@xxxxxxxxxxx>
- Subject: Re: [Tads3] Hints Suggestion
- Date: Thu, 04 Sep 2003 20:56:41 +0000
- To: tads3@xxxxxxxxxxx
"Eric Eve" <eric.eve@harris-manchester.oxford.ac.uk> wrote:
The closeWhenTrue and openWhenTrue conditions on Goals have proved
extremely
valuable, but I have found myself writing so many along the lines of
openWhenTrue = (crown.isKnown) or closeWhenTrue = (crown.moved) that I've
finally invented my own openWhenKnown, closeWhenKnown, openWhenMoved and
closeWhenMoved properties for Goal; this may just be due to the
eccentricities of my particular game, but I wonder if such properties would
be widely enough used to be worth adding to the library.
The when-known properties definitely seem worthwhile to add. I'm not sure
if when-moved will come up so often, but I'd be happy to add it if other
people think it's worth adding - any opinions?
Would it be useful to add openWhen and closeWhen methods that encapsulate
the full set of openWhenXxx checks? These would be almost the same as
openWhenTrue/closeWhenTrue, but the idea here is that they're specifically
for the game's use in 'modify Goal' rather than something you'd define per
instance. This would make it a lot easier for a game to add something like
openWhenMoved when that came up a lot in a specific game, because you'd be
able to add the condition with a simple 'modify':
modify Goal
openWhenMoved = nil
openWhen = (inherited || (openWhenMoved != nil && openWhenMoved.moved))
;
This would make for a clean place to plug in new special-purpose conditions
with 'modify'. The reason to have this in addition to openWhenTrue is that
it leaves openWhenTrue for per-instance use, so that instances don't have to
worry about inheriting a base class condition when defining that.
If we added openWhen, would it reduce the need for something as seemingly
specialized as openWhenMoved? (I still think openWhenKnown would be widely
enough used to add it to the library, though, even with this change.)
--Mike
_________________________________________________________________
Try MSN Messenger 6.0 with integrated webcam functionality!
http://www.msnmessenger-download.com/tracking/reach_webcam