Querying instance state...

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.
Post Reply
User avatar
Joramun
Mon Master
Posts: 925
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Querying instance state...

Post by Joramun »

While making a magic map, I realised I had no idea of how to check the state of a particular instance.
For example, how can I get the state (open/closed) of a door ?

I don't suggest to open the instance flags to direct editing
(since there are already a couple of functions like dsb_toggle(id) to do that)
But being able to know the state of the flags would be nice...
What Is Your Quest ?
Remy
Craftsman
Posts: 111
Joined: Wed Sep 05, 2007 5:24 pm
Contact:

Post by Remy »

It's already open for direct editting. To get (or set) the state, you use the 'flag' functions.
dsb_get_gfxflag(id, GF_INACTIVE)
Will return true if the 'id' is inactive.
User avatar
Joramun
Mon Master
Posts: 925
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Post by Joramun »

Thanks, the "gfx" mislead me...
What Is Your Quest ?
Post Reply