Clothes player starts in

I have a character who is wearing something before the game begins. (it is not visible, though.) How do I tell the game the player is wearing this?


The simple solution: set the object's worn flag to true.

However, this won't apply any stat modifiers for the item or change its alias to include "(worn)" at the end. If you want these things to be done, then in the object's initialisation script (which you can enable on the "features" tab) you should put the line:

WearGarment (this)

(it is not visible, though.)

Not sure what you mean by this. You mean you want the object to be worn despite not being visible? This is a somewhat odd thing to ask for, as invisible objects are generally ignored. If you mean an object which the player is "wearing" but it doesn't appear in their inventory or have any effects, it would probably make more sense to treat it as pure flavour – run WearGarment (name_of_object) when it becomes visible.


I just don't want it to appear in inventory but have effects before it becomes visible


In that case, I suspect that the best option would be running WearGarment in your start or initialisation scripts. I don't think those actually check for visibility, but I don't have Quest on this computer to check.


I decided to let the player dress. The shoes were complicated.
I need to take them off for the player. Is there any way to do that?
I tried Remove Object. They disappeared.
I tried Move Object to Current Room. They moved from inventory to room still saying (worn).
And then they could not be removed even by the player because they were not still in inventory.
I might just have to say remove your shoes or stay locked in the closet forever, but
the first thing I tried was
Unset flag Object (shoes) Flag name (worn)
which was prewritten not java script (but did absolutely nothing.)


I think you want RemoveGarment (shoes).

The utility functions WearGarment and RemoveGarment set or clear the worn flag, update the player's stats if necessary, add or remove (worn) at the end of the alias, and change the object's inventory verbs.


Thanks, Mr. Angel!
"Unset" flag(worn)
from the dropdownenu does absolutely nothing, but RemoveGarment (shoes) might work. I will give it a try.


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

Support

Forums