(done) Flags for dsb_lock_game

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting. You may Image to help finance the hosting costs of this forum.
Post Reply
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

(done) Flags for dsb_lock_game

Post 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?
Last edited by Sophia on Tue Apr 10, 2007 9:24 pm, edited 1 time in total.
User avatar
Parallax
DMwiki contributor
Posts: 424
Joined: Mon Aug 28, 2006 7:56 pm
Location: Back in New Jersey

Post by Parallax »

Is there going to be an exception to allow LC to keep moving when all other monsters are frozen?
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post 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. :)
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

All done for 0.11.
I also added one for blocking mouseclicks in general...
Post Reply