how is this accomplished? something in the 'onused' script section I imagine but ive no idea.
does Arelith do something special so that such objects re-fill water ingame?
PC drinking when using a fixture?
Moderators: Active DMs, Forum Moderators
-
- Posts: 737
- Joined: Fri Jun 24, 2016 10:50 am
- Location: 1 Riverside Cottage, Bendir, Arelith
PC drinking when using a fixture?
Name: Shanna Waynolt nee Tahir
Age: 45
Height: 5'0"
Weight: 106lb
Hair & facial archetype: Ginnifer Goodwin
Body shape archetype: Example
Age: 45
Height: 5'0"
Weight: 106lb
Hair & facial archetype: Ginnifer Goodwin
Body shape archetype: Example
Re: PC drinking when using a fixture?
Arelith secret: wells don't actually have any water in them. You're all drinking illusions.
"Thirst" is just a variable on the PC, and the script on wells simply manipulates that variable. the script itself goes in the OnUsed slot, referencing the PC using GetLastUsedBy(). The variable then just calls our state library, which has some utility methods to manage things like thirst (avoiding us needing to put the code to cap the value at 100 and send a feedback message to the PC into every script that lets you drink - instead we put all that common code in a single library and call it from all the scripts that need it).
"Thirst" is just a variable on the PC, and the script on wells simply manipulates that variable. the script itself goes in the OnUsed slot, referencing the PC using GetLastUsedBy(). The variable then just calls our state library, which has some utility methods to manage things like thirst (avoiding us needing to put the code to cap the value at 100 and send a feedback message to the PC into every script that lets you drink - instead we put all that common code in a single library and call it from all the scripts that need it).
xkcd.com is best viewed with Netscape Navigator 4.0 or below on a Pentium 3±1 emulated in Javascript on an Apple IIGS at a screen resolution of 1024x1.For security reasons, please leave caps lock on while browsing.