I want to stop the party resting if there is a monster near. Not sure of the code. Do you need to "read" when the R key is pressed, so that it runs a script that prevents the party resting? Or is there another way? Any help greatly appreciated.
George
How do you prevent a party from resting?
- Dr.Disaster
- Posts: 2876
- Joined: Wed Aug 15, 2012 11:48 am
Re: How do you prevent a party from resting?
According to the modding reference "Party:isResting()" should tell if the party rests and "Party:wakeUp(immediate)" wakes it up again. The parameter immediate controls how fast the wakeup is.
Re: How do you prevent a party from resting?
You might find the scripting reference and asset definition reference interesting reads. They tell you exactly how to do this:
party.onRest: a hook which is called when the party starts resting. The function gets one parameter, the party itself. If the function returns false, resting is cancelled.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.