Water.

Enpherdaen
22 Sept 2016, 00:30Does anybody know how I can enable the player to drink water? So far you can type "drink water" and the game will tell you that you did. But the water does not disappear. I've only been using Quest for 2 days now.

onimike
22 Sept 2016, 00:52You can add remove object script or move it to an unused room for storage. So after drink water move water to storage then you can reuse water later, what I like to do is use water.volume and add to this volume for more then 1 drink then once you drink decrease counter water.volume then run a if object water counter = 0 then move water to storage
Hope it helps
Mike

Enpherdaen
22 Sept 2016, 00:57Thanks. I'll try my best to understand that code language. :P

Enpherdaen
22 Sept 2016, 01:08How do I make it so when you type "drink water", it considers the move as taking the object?

onimike
22 Sept 2016, 01:24Where you added the drink water script add another script, look under objects and find "move object to object"
Ok so in your object "water" make a verb called "drink" then instead of protein message click drop down tab and choose run a script. After that hit the code view button and add this
msg ("You drink water.")
MoveObject (this, Storage)
And should work
or here is a quick water system i put together for those who want it
<!--Saved by Quest 5.6.6108.15891-->
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="DrinkWater">
<gameid>7bc77a70-2d1b-4013-89c7-847b49a66ebe</gameid>
<version>1.0</version>
<firstpublished>2016</firstpublished>
<start type="script">
CloneObjectAndMove (water, player.parent)
CloneObjectAndMove (water, player.parent)
CloneObjectAndMove (water, player.parent)
</start>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
<object name="cup">
<inherit name="editor_object" />
<inherit name="surface" />
<feature_container />
<isopen type="boolean">false</isopen>
<take />
<listchildren />
<inventoryverbs type="stringlist">
<value>Look at</value>
<value>Use</value>
</inventoryverbs>
<look type="script">
if (Contains (this,water)) {
msg ("There is " +water.volume+ " drinks leftin the cup.")
}
else {
msg ("Its an empty cup!")
}
</look>
<feature_usegive />
<use type="script">
if (Contains (this,water)) {
DecreaseObjectCounter (water, "volume")
}
else {
msg ("No water to drink.")
}
if (GetInt(water, "volume") = 0) {
MoveObject (water, storage)
}
</use>
<displayverbs type="stringlist">
<value>Look at</value>
<value>Take</value>
</displayverbs>
<usestandardverblist />
</object>
</object>
<object name="storage">
<inherit name="editor_room" />
<object name="water">
<inherit name="editor_object" />
<take type="boolean">false</take>
<inventoryverbs type="stringlist" />
<displayverbs type="stringlist" />
<usestandardverblist type="boolean">false</usestandardverblist>
<useindividualverblist />
<fillcup type="script">
if (Got(cup)) {
if (Contains (cup,water)) {
IncreaseObjectCounter (water, "volume")
RemoveObject (this)
}
else {
MoveObject (water, cup)
IncreaseObjectCounter (water, "volume")
RemoveObject (this)
}
}
</fillcup>
</object>
</object>
<verb>
<property>fillcup</property>
<pattern>fill cup</pattern>
<defaultexpression>"You can't fill cup " + object.article + "."</defaultexpression>
</verb>
</asl>
or download here https://www.dropbox.com/s/nyzy5jv7quk7uzm/DrinkWater.aslx?dl=0 rest assure no viruses or anything like that used Quest version 5.6.3 to create.

Enpherdaen
22 Sept 2016, 01:46Thanks laddy.

Anonynn
22 Sept 2016, 03:49Might be able to help with this. I recently overhauled my "Water System" --- so if you need help with collecting, storing, drinking, filling or anything, let me know :)
hegemonkhan
22 Sept 2016, 05:42there's two ways to get typed-in input by the person playing the game / during game play:
- the 'get input' Script (run as script -> add new script -> 'output' section/category -> 'get input' Script, http://docs.textadventures.co.uk/quest/guides/character_creation.html )
- using Commands (left side's "tree of stuff" -> Commands -> Add -> set it up, http://docs.textadventures.co.uk/quest/elements/command.html )
helpful links:
http://docs.textadventures.co.uk/quest/
http://docs.textadventures.co.uk/quest/tutorial/
http://docs.textadventures.co.uk/quest/guides/
http://textadventures.co.uk/forum/samples (more guides: libraries and code samples)
http://textadventures.co.uk/forum/samples/topic/5559/attributes-and-if-script-guide-by-hk