Altering player description

torby
30 Dec 2014, 06:24
Hello all!
I'm a newbie to this program, and I've encountered an issue that I'm trying to work around. I'm writing a game in which the player can wear a few different disguises, and I wanted the "look at self" command to return a different description depending on which clothes the player is wearing. I wrote a script that accomplishes this on the "player" object, but Quest will not find and/or run that script; it will only display the default response. I tried editing this, as well, but there is no option to make it refer to a script! Can anyone help me figure out a way around this? I've been working in the GUI, so is there a code-based method to overcome this?

~Torby

Marzipan
30 Dec 2014, 07:01
Go to where you type the description for the player ("Look at" object description, under the Setup tab) and change the box that says 'Text' to 'Run script'. Or are you doing this already and it's not working?

Alternately, this might be useful.

vvvv ...or just do what he said, yeah

jdpjdpjdp
30 Dec 2014, 07:04
Go into the "player" object's attributes, and find one called "pov_look". By default, it's set to a string that reads "Looking good." Click it, change from string to script, and input whatever script you've written. That should override the default.

torby
30 Dec 2014, 07:10
Haha! That worked!
Thanks, jdpdjp... Thanks, J.D.!
Although, for some reason, "pov_look" was a boolean set to "True"... weird :/

HegemonKhan
30 Dec 2014, 07:34
see here (this is an EXTREMELY useful link):

http://docs.textadventures.co.uk/quest/ ... notes.html

and here is the quite 'hidden' link from the above link (you got to click ln the 'quest 5.3 beta release blog' link, very easy to overlook~miss):

http://blog.textadventures.co.uk/2012/1 ... available/

AND...

you then got to scroll down quite a ways too (to the 'game behavior' section~category) ... laughs... yes quite 'hidden', lol

-------------

and here's a link explaining it:

http://docs.textadventures.co.uk/quest/ ... bject.html

the 'ChangePov' Function ( http://docs.textadventures.co.uk/quest/ ... gepov.html ), enables you to switch what Player Object you currently control, and thus, confusingly, your Player Object (such as the default 'player' Player Object), has two locations for 2 descriptions (one location for a description for when you're controlling this Player Object and another location for when you're not controlling this Player Object).

----------

Marzipan was posting on how to actually do what you want to do, hehe :D

jdpjdpjdp
30 Dec 2014, 19:00
Yes, to be clear, my solution only works if you keep the same player object throughout the game. If you are planning on changing the player object, as HK mentions above, then my suggestion won't work unless you implement it on every object that can become the player object... which defeats the purpose, IMO.

Happy to help! Wow, I GAVE a piece of advice instead of asking for some. Feels like a rite of passage... :lol:

Silver
30 Dec 2014, 19:03
This is what we need. More advice givers = a community. :)