Change script? #150
-
|
I'm wondering about how to implement some Quest 5 functionality. Perhaps there is already an established method within JS or QuestJS that can achieve this functionality, but in Quest 5, I could implement what I knew of as a "change script" to monitor an attribute on an object, and run a function each time that attribute changes state in some way. I admit that it's been so long now that I don't recall the specifics of how it was coded or implemented in Quest 5, but I'm hoping there is a way to do something similar in QuestJS. For you few active Q&A members, thank you very much for all your help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
I can't find it, but I seem to remember asking Pixie about this a while ago, and it ended up that a turn script was the best way to handle such things in QuestJS. It's possible to do this in JS, but you have to create each object with getters and setters for the properties. I don't think this does it that way by default, but I could be completely mistaken. |
Beta Was this translation helpful? Give feedback.
I second this answer. Since properties should only change when a turn begins or ends, you should only need to check them once per turn, and a turnscript works nicely for that.