Trouble with shoes

In my game I have two pairs of shoes, sneakers and office shoes. I am having a lot of trouble getting my player to NOT have both pairs on. Here’s one of my rules–

After putting on the pair of office shoes: if the pair of sneakers is worn by the player: now the pair of sneakers is carried by the player; say "You exchange the comfort of your sneakers for the foot-claustrophobic office shoes."; otherwise: say "You put on your stifling office shoes."

What the rule is supposed to do is, if the player wants to put on one pair, but is wearing the other, he is supposed to automatically take off the pair that he has on. Instead, what happened in testing was that this rule was completely ignored and the player went ahead and put the office shoes on, when he still had the sneakers on. As if the rule I typed did not exist. Is it the ‘standard wearing rule’ that I am running into? Does it allow the player to put on anything wearable?

Originally this was a Check rule, but that did not work either.

I mucked around with clothes for far too much without it being useful.

so step one would be “is it really useful?” i answered mine with “no but it’s fun”
step two is getting stuff to go on things. wait no it’s not, and i think the obstacle is born here.

step two is actually getting things to put stuff onto! make a left foot, make a right foot. make things that can overlie each foot.

this means a left sock and a right sock and at least one will be eaten by the washing machine.

hell, if you want, you can make “laces are a kind of thing. the laces are part of shoes. shoes are a kind of thing. there is a left shoe. there is a right shoe. laces can be tied or untied.” and then do something so that if the player walks while wearing untied shoes he loses the shoes. but that’s step three.

i can throw some very chaotic clothing code at you if you want but you’ll have to sort it out because i’ve not IFfed in months so i can’t figure out most of it anyway.

the code (comprised of some very helpful inputs by people on this forum that are much cleverer than i) has thingies in it which make sure that if you take off sock while wearing shoes, the shoes come off (at least that’s how i remember it) and if you put on a jacket while wearing a jacket you take off the jacket you’re wearing to put on the jacket you wanna wear.

Thanks, WL,

Your last statement(about the jackets) was precisely what I was trying to do. I have similar rules for taking the shoes off–if I take one pair off, the player will automatically put on the other pair if this pair is in hand. These two rules(written for both pairs) work perfectly. It’s just that the similar rules for putting them on won’t work like they should. I can put them on and take them off, but I can’t get the player to take one pair off before he puts the other on. Yes, it’s a bit fussy, but I think the reader might find it odd to see both pairs of shoes being worn in his inventory list.

I wonder if the standard wearing rule automatically has the player put on whatever is wearable and ignore any other rules, even After rules…??

Okay, problem solved–I changed the verb from ‘putting on’ to ‘wearing’(After wearing the pair of sneakers…).
Thanks for the ideas, anyway!