NEWBIE - Question on changing a custom attribute
Ultrablue Games
25 Aug 2016, 04:28Super newbie here - no coding experience.
I've worked through the tutorial for Quest but I'm left with a question.
On the page explaining "custom attributes" it says the advantage of doing this is that you can change attributes depending on the players actions. They make it seem very simple, but don't continue the example with eggs and flour etc. So I'm at a dead end.
So in my game the player has some water. I set the attribute 'volume' to integer '1000' then the 'look at' description to the expression "You have " + water.volume + "ml of cool, refreshing water left."
Now I want the player to spill 100ml of water if they drop it. So obviously the volume attribute needs to be - 100 each time they drop it.
I've fiddled around but I just can't find the way to do it.
Thanks in advance for your help.
hegemonkhan
25 Aug 2016, 07:05the quest doc site:
(very useful for learning quest's abilities/features, once you learn the basics of coding: attribute usage and the 'if' script usage, and also basic functions/scripting)
http://docs.textadventures.co.uk/quest/
there's also guides here (they're a bit hard to find on the doc site):
http://docs.textadventures.co.uk/quest/guides/
and more guides, and libraries and code samples, here:
http://textadventures.co.uk/forum/samples
also, this is a good guide to study and learn (it helps with attributes, menus, and getting typed-in input):
http://docs.textadventures.co.uk/quest/guides/character_creation.html
try reading this guide I got on Attributes and the 'if' Script:
(though it is a bit code heavy)
http://textadventures.co.uk/forum/samples/topic/5559/attributes-and-if-script-guide-by-hk (for the attributes, you got to scroll down a ways, as I try to give people a general sense and understanding of the coding/quest structure)
and feel free to ask me if you got any questions, or let me know if it totally made no sense to you, and I'll see if I can help you with understanding Attributes better.
also, here is a step by step guide on making a demo game, that involves learning/using attributes and status attributes, see if you can follow through it and then "play" the game you made:
http://textadventures.co.uk/forum/quest/topic/5387/i-really-need-help#37375
and, again, feel free to ask if you got any questions or need help with anything.
also, you can take a look at this thread too, as it also asked about using attributes and the 'if' script:
http://textadventures.co.uk/forum/quest/topic/2sewm1o9fuiyfmbgq7vepq/need-help-with-script-specifics
hopefully... this will be of some help to you... if not... let me know... and I'll try to help you understand all of it... eventually with time and small step by small step, hehe :D
Ultrablue Games
26 Aug 2016, 03:02Thank you very much! Lots of reading to get stuck into - I'm looking forward to learning more.