Events in DSB

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
Kesa
Journeyman
Posts: 67
Joined: Fri Sep 10, 2010 11:44 pm

Events in DSB

Post by Kesa »

I want to make my game hold quests and storyline events, but there seems to be some slight codes I am lacking to make it work 100% how I want.

All movement, inventory, etc needs to be locked, but using dsb_lock_game tends to lock everything even triggers etc
So is there some kind of delay function other then dsb_delay(#, function) cause that seems to only work on functions right?
If not is there something else to use besides lock_game? Something that will do what I am asking but not lock everything. I want everything BUT triggers/call_functions locked.

Now I read that lock and unlock can work on seperate aspects but obviously dsb_lock_game(movement) did not work out other then errors.
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Events in DSB

Post by Sophia »

The locking flags weren't on the wiki, only in base/global.lua. For convenience I've added them to the wiki.

The flag you want seems to be LOCK_MOVEMENT.

To lock multiple aspects just put them together with a +. Such as, to lock both movement and actuators, dsb_lock_game(LOCK_MOVEMENT + LOCK_ACTUATORS)
User avatar
Kesa
Journeyman
Posts: 67
Joined: Fri Sep 10, 2010 11:44 pm

Re: Events in DSB

Post by Kesa »

thank you very much ^.^ now my startup.lua isnt cluttered with functions, hehe
Post Reply