Case Closed...

Hello,

I have a container "cabinet" with these attributes:

	openMsg:function() {
		msg("Creeeeaaaakkkkk")
	},
	closeMsg:function() {
		msg("Groooaaaannnn")
	},

openMsg works as expected and replaces the default response.
but closeMsg does not. it shows the default close message.


That is bad documenting, I am afraid...

Earlier versions had openMsg and closeMsg functions, and so they are in the docs. For consistency they were replaced with msgClose and msgOpen, which are strings, not functions. That said, I kept the openMsg function because the code is used in two places to handle opening an unlocked container and opening a locked container when the player has the key.

  msgClose:"Groooaaaannnn",
  msgOpen:"Creeeeaaaakkkkk",

See also here:
https://github.com/ThePix/QuestJS/wiki/Restrictions,-Messages-and-Reactions

Meanwhile, I will update the docs...


Thanks for the clarification


I also cannot seem to get the "getTakeMsg" attribute and "getDropMsg" attribute to work either, is this the same issue?

https://github.com/ThePix/QuestJS/wiki/Template:-TAKEABLE


Yes, same issue. Docs now updated.


Good Morning,

I noticed that there are additional edits needed on the https://github.com/ThePix/QuestJS/wiki/Template:-OPENABLE page:

The only important attribute is "closed". However, you can override the default open and close messages with your own openMsg and closeMsg functions.

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

Support

Forums