Force player to be wearing an item

NecroDeath
26 Sept 2017, 15:59

Hi,

I need to force the player to wear a particular item at one point, 'e.g. the monk tells you to put on the habit, and you do as your are told.' I know the expression is habit.worn, but how do I force this to be true?

(using online editor)


K.V.
26 Sept 2017, 20:17

WearGarment(habit) to have the player wear the garment.

RemoveGarment(habit) to have the player take it off.


To check if it's worn:

if (habit.worn) {
   msg ("The player is wearing the habit!")
}
else {
  msg ("The player is not wearing the habit.")
}

K.V.
26 Sept 2017, 20:24

image
image
image


K.V.
27 Sept 2017, 06:45

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


lordpalandus
30 Sept 2017, 07:34

Or, you can do like me and create your own custom equip #object# or unequip #object#, that is designed to have more features than the builtin function call.