Page 1 of 1
Way to modify party speed ?
Posted: Mon Nov 10, 2014 3:19 pm
by cromcrom
Hello there my friends
While waiting for the next Glögg coding cession (that I hopefully won't miss because of being at work

), and requesting a get/set party speed modifier, are you people aware of a way to freeze the party in place (not mentionning the paralysis condition, I justwant to prevent the party from moving). If you know a way to change the speed, I am interested, too ^^
Thanks in advance.
Re: Way to modify party speed ?
Posted: Mon Nov 10, 2014 4:03 pm
by Blichew
Maybe try this with counter which increases it's value via onMove party hook ? Check with counter.value % 2 and move only if it's an even value.
Key to this seems to be if party.onMove is executer before or after actual move...
Re: Way to modify party speed ?
Posted: Mon Nov 10, 2014 4:17 pm
by msyblade
I'm not yet familiar with the differences in syntax for party hooks in LoG2, but in LoG1 we would put an onMove hook on the party, which connects to a counter. If the counter reads 0 then onMove returns false. Then it was just placing a pad to decrement the counter to 0, and a timer to increase it to 1 when ready to allow movement again.
Re: Way to modify party speed ?
Posted: Mon Nov 10, 2014 5:03 pm
by cromcrom
I already have a quite complex exhaustion system. However, it only increases food consumption so far. I will try the return false for onMove hook, although I think it doesn't work. I will check this evening. Thanks for the tips anyways

Re: Way to modify party speed ?
Posted: Mon Nov 10, 2014 7:19 pm
by remma
used to be able to do it with the framework in LoG1
function freeze()
fw.setHook('party.test.onMove',
function(self,dir)
return false
end
)
end
function unfreeze()
fw.removeHook('party.test.onMove')
end
So something involving an onmove hook?
Re: Way to modify party speed ?
Posted: Mon Nov 10, 2014 8:37 pm
by cromcrom
I check, "return false" works like a charm. It should be really easy to check some variables or function to return false, than have a delayed call or timer setting the return to true. I will try this, sounds fun.
Re: Way to modify party speed ?
Posted: Tue Nov 11, 2014 1:58 am
by cromcrom
Ok, I have it

Re: Way to modify party speed ?
Posted: Tue Nov 11, 2014 5:27 am
by msyblade
good deal crom, glad you got it.

Re: Way to modify party speed ?
Posted: Tue Nov 11, 2014 9:34 am
by Aisuu
cromcrom wrote:Ok, I have it

Can you provide full script please? I need to slow party in specific places as well for my mod..
Re: Way to modify party speed ?
Posted: Tue Nov 11, 2014 9:43 am
by cromcrom