modeling events inside a room
Tekay
17 Sept 2012, 14:34I want to model something like this:
I know i could do this with a switch-command but those events might become very complex, eventually having cycles in it, too. So i wonder, if i could model those events similar to a hierarchical finite state machine. How would you do that?
There is a button on the wall
> press button
The room begins to shake. What will you do?
* Stay where you are (die)
* hide under the table (get injured, then captured)
* press yoourself against the wall. (click)
You press yourself firmly against the wall as the ceiling starts so collapse. Sudenly the wall behind you gives way and you stumble into an almost dark room. "Hello there", an arrogant voice greets you, "I've been expecting you. How come that you have taken so long to find me?"
* "<some friendly answer>" (some more talk, then maybe getting tricked an captured)
* "<some aggressive answer>" (some more talk, then a regular fight)
* Attack. (regular fight, you hit him first)
I know i could do this with a switch-command but those events might become very complex, eventually having cycles in it, too. So i wonder, if i could model those events similar to a hierarchical finite state machine. How would you do that?
sgreig
17 Sept 2012, 18:16If you want to have the options displayed like that, you might be better off making your game using Quest's gamebook mode. It's streamlined for making games like that.