Page 1 of 1

(done) Flags for dsb_lock_game

Posted: Fri Apr 06, 2007 7:38 pm
by Sophia
Split off from here: http://www.dungeon-master.com/forum/vie ... hp?t=26606
Joramund wrote:
Sophia wrote:So it would allow mouseclicks, but nothing else?
How about mouseclicks on dungeon objects? Can the party pick things up? How about changing the gamestate in general?
Well, something like freeze time would do the job, except the party arrow movement should also be blocked. Of course if it's not possible to change the game state (such as moving objects around etc.) it's not very interesting.
My idea for how to make all of this doable without creating too large of a mess for myself is to make dsb_lock_game() take a bitflag as an argument. If it is passed nothing, for the sake of backward compatibility, that will be taken to mean "all flags." The separate flags, though, would then be:

- FLAG_ACTUATORS = stop the party from being able to click on anything or trigger anything.
- FLAG_MOVEMENT = stop the party from being able to initiate a move
- FLAG_MAGIC = stop the party from casting spells
- FLAG_INVENTORY = stop the party from accessing inventory
- FLAG_ATTACK = stop the party from opening an attack method or from triggering an attack method
- FLAG_MESSAGES = stop all message timers
- FLAG_FLYERS = stop all flying object timers
- FLAG_CONDITIONS = stop all condition timers
- FLAG_MONSTERS = stop all monster timers.
This would deprecate the gameflag now used to handle Magic Boxes, and they would be done this way instead.

Anything I missed?

Posted: Fri Apr 06, 2007 10:26 pm
by Parallax
Is there going to be an exception to allow LC to keep moving when all other monsters are frozen?

Posted: Sat Apr 07, 2007 12:28 am
by Sophia
Parallax wrote:Is there going to be an exception to allow LC to keep moving when all other monsters are frozen?
That's a good point.
I'd actually forgotten about that. Right now he'll freeze too.
I'm not going to fix the current implementation because I'll likely be modifying the whole system soon....

Anyway, maybe two flags, as there are some times when you really do want to freeze EVERYTHING. :)

Posted: Tue Apr 10, 2007 9:25 pm
by Sophia
All done for 0.11.
I also added one for blocking mouseclicks in general...