As I believe TheMadExile can attest, I have absolutely NO experience with JavaScript, so I was wanting to do this as a passage, because I can already see how the code should be shaped in Twine/Sugarcube.
I want to have some code that will check to see if certain variables are true (equipped inventory items in this case), and return a variable for the passage. This way, I can have events which will be able to check and describe equipped items, and possible react to them, without having a huge pile of If/Else statements clumping up EVERY SINGLE TIME I want to pull this off.
I wouldn't worry too much about a few extra If Trees, but since I will almost certainly add more equipable items as I work, it would be nice to have a single function somewhere to add them to, instead of having to go hunting through every passage that does a clothes check.
EDIT: Is there some perfectly simple method of doing this that I'm completely missing?
I want to have some code that will check to see if certain variables are true (equipped inventory items in this case), and return a variable for the passage. This way, I can have events which will be able to check and describe equipped items, and possible react to them, without having a huge pile of If/Else statements clumping up EVERY SINGLE TIME I want to pull this off.
I wouldn't worry too much about a few extra If Trees, but since I will almost certainly add more equipable items as I work, it would be nice to have a single function somewhere to add them to, instead of having to go hunting through every passage that does a clothes check.
EDIT: Is there some perfectly simple method of doing this that I'm completely missing?