Page 1 of 1

Events in DSB

Posted: Wed Apr 20, 2011 11:36 pm
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.

Re: Events in DSB

Posted: Thu Apr 21, 2011 12:30 am
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)

Re: Events in DSB

Posted: Thu Apr 21, 2011 12:32 am
by Kesa
thank you very much ^.^ now my startup.lua isnt cluttered with functions, hehe