Freeze party in place at will (Via mahric)
Posted: Tue Nov 27, 2012 4:53 pm
Still playing mahric's Wine Merchant Basement (I am just enamored with this mod), and he released his source files for us. One little trick I really wanted to get from him was freezing the party in place to allow storyline fleshing, etc. I pm'd him to ask and this is how simple he made it.
create a counter in your dungeon set to 1,call it whatever you like. (I used cMove)
Then, clone your party in your init.lua with an onMove hook for the counter. If the counter is at 0, onMove returns false. connect a plate where you want to stop the party, to decrement the counter. BAM, onMove returns false.Set a timer to increment the cMove counter, for the time you need to do what you want. Then BAM!, party has control again. Here's the party clone script to put in the init.lua (Make sure to reference the counter correctly, or onMove will crash to desktop.
And it's that simple! Thanx again Mahric!
create a counter in your dungeon set to 1,call it whatever you like. (I used cMove)
Then, clone your party in your init.lua with an onMove hook for the counter. If the counter is at 0, onMove returns false. connect a plate where you want to stop the party, to decrement the counter. BAM, onMove returns false.Set a timer to increment the cMove counter, for the time you need to do what you want. Then BAM!, party has control again. Here's the party clone script to put in the init.lua (Make sure to reference the counter correctly, or onMove will crash to desktop.
Code: Select all
cloneObject{
name = "party",
baseObject = "party",
onMove = function(self, dir)
if (cMove:getValue() == 0) then
return false
end
return true
end,
}