Page 1 of 1

PostPosted: Thu Oct 28, 2010 4:04 am
by Chilli
Hi all:

Another question here. I have an object in my game -- it's a Gym Bag -- that is a container. It can also be opened and closed. It starts off in a closed state.

In the Gym Bag are four items -- a Warmup Jacket, a Workout Shirt, some Sweat Pants, and a pair of Exercise Shoes.

The player, at the time, is wearing a Worn Shirt, Worn Jeans, and Worn Shoes. One of the tasks that must be completed is to remove the worn items of clothing, put them in a locker, and then put on the items in the Gym Bag.

In testing, I'd had the player's items removed and placed in the locker. I had not yet opened the Gym Bag. However, I was able to type "GET PANTS" and received the message "You take the workout pants."

This really puzzled me. How could the player manage to take an item that was supposed to be inside a closed container?

Oh, I should state that I do not have any tasks associated with the "GET PANTS" statement; that was just using the intrinsic behavior within ADRIFT. Also, this is with v4 of ADRIFT.

Any thoughts will be greatly appreciated!

Sincerely,

"Chilli"

PostPosted: Thu Oct 28, 2010 4:43 am
by Albaniua
hmmm run the debugger. pick objects and select the gym bag. in the status box, does it say "closed" ?
I made what you were describing and it worked/didn't work depending on the status of the bag.

PostPosted: Fri Oct 29, 2010 7:32 pm
by reelyor
Add a restriction to "Get Pants"> "bag must be open"
Add a second "Get Pants" task for when bag is closed and add response" You can't" or something similar




Edited By reelyor on 1288380909

PostPosted: Fri Oct 29, 2010 9:22 pm
by Duncan_B
Do your jeans have an alias of "pants"? You really shouldn't be able to take the sweat pants unless they are visible.

PostPosted: Fri Oct 29, 2010 9:55 pm
by Chilli
Hi Duncan:

Yes, I believe there is an alias -- I can't look at the code right now to confirm this, but I'm about 99% certain.

However, I did notice that, even with two items that are similar but without aliases, there is odd behavior.

There are two shirts. One is referred to as "a worn shirt" and the other is "a workout shirt." The "worn shirt" is in a "locker" and the "workout shirt" is in a "gym bag," both of which are open. I cannot get the system to let me "get the workout shirt." Every time, it comes back and says "You take the worn shirt." However, if I carry the command out one more level, to "get the workout shirt from the gym bag," it works. Or, if the locker is "closed," then "get the workout shirt" works.

Just kind of strange....

"Chilli"

PostPosted: Fri Oct 29, 2010 10:30 pm
by Duncan_B
For the first concern, I was thinking that perhaps if jeans had an alias of pants, might you actually be taking not the workout pants from the closed bag, but the jeans from the open locker or whatever?

As for the matter of the shirt aliases, what happens if you also add "workout" as a synonym for the workout shirt? Are you using aliases in the object creation window or are you defining synonyms?

I haven't been able to re-create your experience of taking an object out of a closed container, so my guess is that there's something wrong in here that is fixable.

PostPosted: Fri Oct 29, 2010 11:34 pm
by Chilli
Hi Duncan:

I think I only used one synonym in this game, and it defining system command "take" as alternative command "get". Could that be part of the problem?

Since no one else has been able to recreate the problem I reported, I'm starting to doubt my own recollection of the issue. Either I didn't see things correctly when it happened (surprisingly possible, I fear, given my late-night programming opportunities) or the glitch did occur and I somehow fixed it -- quite by accident! -- while trying to figure out what was going on.

I truly appreciate your assist and insights.

Sincerely,

"Chilli"

PostPosted: Sat Oct 30, 2010 9:09 am
by Campbell
I would think there is a good possibility that alias would cause problems.