Way to modify party speed ?
- cromcrom
- Posts: 549
- Joined: Tue Sep 11, 2012 7:16 am
- Location: Chateauroux in a socialist s#!$*&% formerly known as "France"
Way to modify party speed ?
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.
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.
A trip of a thousand leagues starts with a step.
Re: Way to modify party speed ?
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...
Key to this seems to be if party.onMove is executer before or after actual move...
Re: Way to modify party speed ?
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.
Currently conspiring with many modders on the "Legends of the Northern Realms"project.
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
- cromcrom
- Posts: 549
- Joined: Tue Sep 11, 2012 7:16 am
- Location: Chateauroux in a socialist s#!$*&% formerly known as "France"
Re: Way to modify party speed ?
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
A trip of a thousand leagues starts with a step.
Re: Way to modify party speed ?
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?
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?
- cromcrom
- Posts: 549
- Joined: Tue Sep 11, 2012 7:16 am
- Location: Chateauroux in a socialist s#!$*&% formerly known as "France"
Re: Way to modify party speed ?
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.
A trip of a thousand leagues starts with a step.
Re: Way to modify party speed ?
good deal crom, glad you got it.
Currently conspiring with many modders on the "Legends of the Northern Realms"project.
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
Re: Way to modify party speed ?
Can you provide full script please? I need to slow party in specific places as well for my mod..cromcrom wrote:Ok, I have it
- cromcrom
- Posts: 549
- Joined: Tue Sep 11, 2012 7:16 am
- Location: Chateauroux in a socialist s#!$*&% formerly known as "France"
Re: Way to modify party speed ?
A trip of a thousand leagues starts with a step.