objects attached to human are not listed?

Brian123
I create a object male in Quest then I add objects to the male such as bow tie. When I look at male object while aging the game the bow tie is not displayed.
I have no problem with adding a object to a table in the game and viewing the object when I look at the object.

Another problem is when I make a invisible object visible then it's not seen until I issue a Look common at the user prompt.
is there a way to force a Look command in the script without the user having to type it in?

Brian123

Brian123
Sorry I should have corrected my text before posting.
Her is what it should read.

I create a object male in Quest then I add objects to the
male such as bow tie. When I look at male object while playing the game the bow tie is not displayed.
I have no problem with adding a object to a table in the game and viewing the object when I look at the table.

Another problem is when I make a invisible object visible in a script command then it's not seen until I issue a Look common at the user prompt.
is there a way to force a Look command in the script without the user having to type it in?

Brian123

Silver
There's a number of ways of solving this. Are you using parser input only or hyperlinks?

Silver
I think it can be done like this.... Create the object (medal?) as a scenery object in the same room as the NPC. This is fine if the NPC is static. Further code is needed if they move to keep the object with them.

medal.worn = true 


do that if they're wearing it, then:

msg ("You can see a {object:Dwarf}{if medal.worn: who is wearing a shiny {object:medal}.")


(This is assuming you're using clickable links and actions).

Brian123
Thanks Silver.

I'll try that but I still don't understand why you can add objects to a human object in the game and not have them displayed when looking at the human. It seems the only advantage of adding objects to a human object is so that they get moved if the human object moves to another location.

Brian123

jdpjdpjdp
What Silver said, basically. My only suggestion would be that, instead of making it scenery, make it invisible so that the option exists to then turn it visible, say when the man is looked at. Also, there's no real reason it needs to be INSIDE the man object -- these are virtual things existing only as text, after all, so the connection is purely imaginary anyway.

As for why humans don't show what they are wearing when looked at, it's because most of the time it doesn't matter. Containers and surfaces (like the table) have special features built in to display their contents when looked at, because for those kinds of items it usually does matter.

HegemonKhan
the 'look~lookat' (for non-Room Objects) and 'description' (for Room Objects) Verbs~Functions~Scripts (whatever they are, lol) awaits for *YOUR* own customization of its scripts, that's why those scripts ( 'msg' or 'if+msg' Scripts ) that display what you want, don't yet exist by default. This probably won't make sense to you, as it requires you to understand how quest's coding works. You have to add the Scripts that will display what you want, within the 'look~lookat' or 'description' Verbs~Scripts~Functions (whatever they are, lol).

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

also, for your Player Objects... since they can be active (current game.pov) or non-active (not current game.pov), you got *TWO* 'look~lookat~description' locations, one for when the Player Object is active~controlled and one for when the Player Object is not active~controlled

so, if you script in the 'look~lookat~description' location for when the Player Object is non-active~controlled, then you won't be seeing these scripts, if (as likely), your Player Object is active~controlled, (as it is usually your main~sole Player Object, and you don't know about multiple Player Object functionality or you know about it but it's too advanced for you to implement or just not needed or too cumbersome for your work~time on the game).

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

if you don't want certain 'buttons' and 'hyperlinks' to be displayed initially (at game start)... its a bit more complicated...

the simple first part is to:

'game' (the special Game Object) -> Room Descriptions (Tab) -> automatically generate object display verbs list and~or display hyperlinks-> uncheck it

and~or

'(whatever)' (your individual Objects) -> Object (Tab) -> Display Verbs and~or Inventory Verbs -> (check ~ uncheck ~ set it up how you want)

the hard second part is going into the code, and coding in the rest of what you need to do... (when those Verbs become available) ... I can help you do this, but it's a bit advanced for people new to quest and especially to coding~programming.

The reference material for this stuff is Pixie's Spell Library, which I think is now hidden~combined with Pixie's Simple Combat and~or Tabs sections within the tutorial:

there is no 'cast' button-verb displayed~available until you 'learn' the spell first, then the 'cast' button-verb becomes displayed~available

I can post Pixie's Spell Library up, if you can't find the material, I got it saved *before* it got mixed~hidden in the tutorial due~during the shift to the new wiki pages, hehe :D

jaynabonne
Brian123 wrote:Thanks Silver.

I'll try that but I still don't understand why you can add objects to a human object in the game and not have them displayed when looking at the human. It seems the only advantage of adding objects to a human object is so that they get moved if the human object moves to another location.

Brian123

I think the question needs some specifics. What do you mean by "have them displayed"? What would you like the text to say? If the human object is wearing socks under his pants, are they displayed? If there is a knife concealed in his sock or a lighter in his pocket, are they displayed?

I think ultimately, "have them displayed" changes greatly depending on context. Given that Quest isn't doing what you want already, if you can get down to how you'd like the text to read, we should be able to help.

The Pixie
The simple way is to set your person to also be a container. Set him to be a "surface", and modify the contents of the two text boxes on the Container tab.

HegemonKhan
I'm way over-thinking about using dynamic expression 'msg' scripts in the 'look~lookat~description' Scripts~Functions~etc, when all I needed to think about was using the 'container:surface' Attribute~Script~Function~etc... HK bangs head on his desk... laughs, argh! I really need to build up my knowledge base again (and fully) of the already built-in stuff... laughs. Doing too much custom coding... lol.

Silver
Me too, although I did say there's a number of ways to solve it. Setting the NPC as a container will only reveal the children when examined but he may want the information to be relayed in the room description too.

HegemonKhan
hopefully, this over-thinking of me~ours, is a result of progressing in code-learning, and not a degression in code-learning, laughs ;)

Silver
Personally I'm not keen on object lists so that wouldn't be the first way I'd think of it. And if he's using hyperlinks and menus then he would need to use the text processor to relay the information if he wnts to do it dynamically rather than in lists and then the NPC wouldn't necessarily have to be the parent of the objects.

The Pixie
Silver wrote:Me too, although I did say there's a number of ways to solve it. Setting the NPC as a container will only reveal the children when examined but he may want the information to be relayed in the room description too.

By default a surface will do the latter too.
Silver wrote:Personally I'm not keen on object lists so that wouldn't be the first way I'd think of it. And if he's using hyperlinks and menus then he would need to use the text processor to relay the information if he wnts to do it dynamically rather than in lists and then the NPC wouldn't necessarily have to be the parent of the objects.

Generally it is best to do it one way and one way only. If you have the NPC containing the objects, do not use lists too. You are making it over-complicated, and therefore more prone to error.

What I would do is write a script for the NPC's description that checks what objects it has, and acts accordingly, rather than doing it as a container. Some will be worn, but others may be held, not visible, etc. so it is not necessarily that straightforward.

Silver
Well lists are unavoidable if people are able to drop objects. You'd spend the rest of your life coding for every permutation if you wanted that information to appear dynamically too afaik.

The Pixie
To clarify, I would not store the data in a list. You will need to use lists when you are doing stuff (i.e., use GetDirectChildren() to get a list, and then use the objects in that list to give your output).

Silver
Ah ok.

HegemonKhan
there's many many methods that you can pick from, so just pick whatever works best for you, some of the methods:

------

'Scopes~Alls~Gets~Contains' : these enable you to select~check~gather~group for the (child) Objects within other Objects: Player Objects, Room Objects, and Other-Object (non-room non-player) Objects, and the Omni-Object: the entire game itself. So, you don't need to use~create lists. As these (Scopes~Alls~Gets~Contains) are like (or are) lists themselves already anyways
+
'if~foreach~for' : then further enable you to check~gather specific Objects, via based upon their Attributes
+
Scripts : the actions you want to do upon them

------

using (custom) Lists to select~group~gather objects
+
'if~foreach~for' : then further enable you to check~gather~group specific Objects, via based upon their Attributes
+
Scripts : the actions you want to do upon them

------

etc etc etc methods...

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums