So, I’m playing with complex NPCs.
One of them is a dog, and she has a tail:
+bingoTail : Component 'tail 'tail' desc = "<<bingo.curState.tailDesc()>>" ;
And the description of her tail can vary depending on her actorState, so I do this:
+ bingoBasic : ActorState tailDesc = '''Her tail hovers a few inches off the ground, waving slightly from side to side. ''' ; +bingoExcited : ActorState tailDesc = '''Her tail waves madly from side to side in her excitement. ''' ;
And all this works and is good.
However, I would like a default desc system, such that I don’t have to put one into every actorState (the game is basically built on different actorstates, so there’s a few of them, for the different characters).
So far, what I did was put a default desc property in bingoTail and then have a line in the actorstate that says something like:
But this line has to be put into every actorstate that doesn’t change it, and since there’s a few components and things it ends up being quite a large block of lines that have to go into each actorstate. Now, this is fine, and it works, and I can do it that way if I must, but is there a more elegant solution I’m overlooking?