adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-devel] Re: schedule stuff update


From: Kai Sterker
Subject: Re: [Adonthell-devel] Re: schedule stuff update
Date: Tue, 20 Aug 2002 16:47:27 +0200

On Mon, 19 Aug 2002 22:22:19 +0200 Kai Sterker wrote:

> So what remains now? Bjarn's and Erek's schedules need to be
> rewritten. A 'pause' method for character needs to implemented, so
> they don't run away during dialogues. As all events that belong to a
> character are stored in that character's event_list, the simplest
> thing might be to do this pausing on event level. Of course one has to
> be careful with time_events, as the gametime progresses while the
> characters (or their events) are on hold.

Maybe we should move our discussions to battle.net, then I wouldn't have
to talk to myself all the time ;).

But serious, I'll go about pausing the events now, and here's how I plan
to handle stuff: Well, map_events aren't a problem at all. As long as
they are paused, they simply don't execute their script. No big deal.
Time_events are a little bit more tricky, especially as there are two
versions of them: relative and absolute time events. 

For the relative events I would suggest to prolong the alarm time by the
time the event was paused. For example, if the event is "say something
in 3 minutes", and the character is paused for 5 minutes, we would still
wait those 3 minutes before speaking.

Absolute events OTOH shouldn't be changed. If the event is "stop working
at 18:00", the character should stop with the work as soon as the player
finished talking to him, even if it's 18:15 by then. Prolonging the
alarm time by the 30 minutes of dialogue wouldn't make sense here.


The rest of the implementation is trivial then: events and mapcharacters
get a pause/resume method pair. Calling mapcharacter::pause will iterate
over the event_list and call event::pause for each event inside. Same
for resume.

That way, individual characters can be easily stopped or started without
affecting any schedule scripts. Their current state is easily saved and
restored too.

So that's what I'll do the next few minutes; shouldn't take much longer
;). Then I have time to answer my own mails again! :P

Kai




reply via email to

[Prev in Thread] Current Thread [Next in Thread]