[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Scripts with pause
- From: "Russell Y. Webb" <rwebb@...>
- Date: Fri, 5 Aug 2005 17:36:50 +1200
On Aug 4, 2005, at 11:57 PM, Jose Marin wrote:
Good idea, Russell.
I think that, in this case, I must design the scripts
to act as a state machine.
Well they will likely be a FSM in any case. The world including the
actors presumably have state information, but other than that they
are free from state since they have issued a plan to carry out some
goal. When they get called again their first task could be to figure
out what state they are in now (since they don't know what has
happened in the world).
Sort of like:
return world:GetHealth(self) < .3
if self:Hurt() then
if self:Hungry() then