BUT... as soon as the lunchbox is taped and the normal lunchbox is swapped out, then I will always see the 'Else' message. This is where I stopped messing with it because I see serious confusion for me down the road.
EDIT: Just thought of this... Could I use one flag (say 'CPS') to control all of that? Flag goes up when adding a lunchbox... make the lunchbox undroppable... and have one default else under a command for each lunchbox that says something simple, like "Good idea, but not yet!"
<!--Saved by Quest 5.5.5328.26617-->
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Tutorial 3">
<gameid>471f7646-a133-44d4-a46f-a2b365c0116c</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
<object name="fridge">
<inherit name="editor_object" />
<inherit name="container_open" />
<alias>Fridge</alias>
<usedefaultprefix />
<feature_container />
<isopen type="boolean">false</isopen>
<look>A fridge with a built in freezer.</look>
<object name="freezer">
<inherit name="editor_object" />
<inherit name="container_open" />
<alias>Freezer</alias>
<feature_container />
<isopen type="boolean">false</isopen>
<look>A freezer.</look>
<object name="ice">
<inherit name="editor_object" />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<take />
<alias>Ice</alias>
</object>
</object>
<object name="chemicals">
<inherit name="editor_object" />
<take />
<usedefaultprefix type="boolean">false</usedefaultprefix>
</object>
</object>
<object name="table">
<inherit name="editor_object" />
<inherit name="surface" />
<alias>Table</alias>
<feature_container />
<look>A wooden table.</look>
<object name="tape">
<inherit name="editor_object" />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<alias>Duct tape</alias>
<look>A roll of duct tape.</look>
<take />
<cut type="scriptdictionary">
<item key="knife">
if (Contains (deadroom,taped)) {
MoveObject (taped, deadroom2)
MoveObject (cut, deadroom2)
MoveObject (taped, deadroom2)
MoveObject (order2, deadroom2)
if (Contains (deadroom2,order2)) {
MoveObject (order1, deadroom2)
msg ("You successfully cut the extra tape off the lunchbox.")
}
}
else if (Contains (deadroom,order2)) {
msg ("You cut the tape and wonder, Why you cut it in the first place.")
}
else {
msg ("Oops, I cut myself.")
}
</item>
</cut>
<tape type="scriptdictionary">
<item key="lunchbox">
if (Got(tape)) {
MoveObject (taped, deadroom)
if (Contains (deadroom,taped)) {
MoveObject (order1, deadroom2)
msg ("You successfully tape the lunchbox.")
}
}
else {
msg ("This seems wrong.")
}
</item>
</tape>
</object>
<object name="lunchbox">
<inherit name="editor_object" />
<inherit name="container_open" />
<alias>Lunchbox</alias>
<take />
<feature_usegive />
<feature_container />
<isopen type="boolean">false</isopen>
<look type="script">
if (Contains (table,lunchbox)) {
msg ("It's a lunchbox.")
}
else if (Contains (deadroom,taped)) {
msg ("The lunchbox has tape around it but there is still extra tape left over.")
}
else if (Contains (deadroom2,cut)) {
msg ("The lunchbox has tape around it.")
}
else if (Contains (deadroom2,ice2)) {
msg ("It's a lunchbox with tape and ice inside it.")
}
else if (Contains (deadroom2,order4)) {
msg ("It's a thermal lunchbox.")
}
</look>
<useon type="scriptdictionary">
<item key="tape">
msg ("You wrap the tape around the lunchbox.")
MoveObject (taped, lunchbox)
if (Contains (,)) {
}
</item>
</useon>
<fill type="scriptdictionary">
<item key="ice">
if (not lunchbox.isopen) {
msg ("I need to first open it.")
}
else if (lunchbox.isopen) {
if (Contains (deadroom2,order2)) {
MoveObject (ice, lunchbox)
MoveObject (cut, deadroom3)
MoveObject (taped, deadroom3)
MoveObject (order3, deadroom2)
if (Contains (deadroom2,order3)) {
MoveObject (ice2, deadroom2)
msg ("You fill up the lunchbox with the ice.")
}
}
else if (Contains (deadroom,order3)) {
MoveObject (ice, lunchbox)
msg ("I don't think this is right.")
}
}
else {
msg ("The ice is melting.")
}
</item>
<item key="chemicals">
if (lunchbox.isopen) {
if (Contains (deadroom2,order3)) {
MoveObject (order4, deadroom2)
if (Contains (deadroom2,order4)) {
MoveObject (chemicals, lunchbox)
MoveObject (ice2, deadroom3)
MoveObject (thermal, deadroom3)
msg ("Nice. A thermal lunchbox.")
}
}
else if (Contains (deadroom,order4)) {
MoveObject (chemicals, lunchbox)
msg ("This really does not look right. I need to start over.")
}
}
else if (not lunchbox.isopen) {
msg ("To fill it, I need to open it first.")
}
else {
msg ("Hmm.")
}
</item>
</fill>
<object name="cut">
<inherit name="editor_object" />
<visible type="boolean">false</visible>
<usedefaultprefix type="boolean">false</usedefaultprefix>
</object>
<object name="taped">
<inherit name="editor_object" />
<visible type="boolean">false</visible>
<usedefaultprefix type="boolean">false</usedefaultprefix>
</object>
</object>
<object name="knife">
<inherit name="editor_object" />
<alias>Knife</alias>
<look>A sharp knife.</look>
<take />
</object>
</object>
</object>
<object name="deadroom">
<inherit name="editor_object" />
<visible type="boolean">false</visible>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<object name="order1">
<inherit name="editor_object" />
<visible type="boolean">false</visible>
<usedefaultprefix type="boolean">false</usedefaultprefix>
</object>
<object name="order2">
<inherit name="editor_object" />
<visible type="boolean">false</visible>
<usedefaultprefix type="boolean">false</usedefaultprefix>
</object>
<object name="order3">
<inherit name="editor_object" />
<visible type="boolean">false</visible>
<usedefaultprefix type="boolean">false</usedefaultprefix>
</object>
<object name="order4">
<inherit name="editor_object" />
<visible type="boolean">false</visible>
<usedefaultprefix type="boolean">false</usedefaultprefix>
</object>
<object name="ice2">
<inherit name="editor_object" />
<visible type="boolean">false</visible>
<usedefaultprefix type="boolean">false</usedefaultprefix>
</object>
<object name="thermal">
<inherit name="editor_object" />
<visible type="boolean">false</visible>
<usedefaultprefix type="boolean">false</usedefaultprefix>
</object>
</object>
<verb>
<property>cut</property>
<pattern>cut</pattern>
<defaultexpression>"You can't cut " + object.article + "."</defaultexpression>
</verb>
<object name="deadroom2">
<inherit name="editor_object" />
<visible type="boolean">false</visible>
<usedefaultprefix type="boolean">false</usedefaultprefix>
</object>
<verb>
<property>tape</property>
<pattern>tape</pattern>
<defaultexpression>"You can't tape " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>fill</property>
<pattern>fill</pattern>
<defaultexpression>"You can't fill " + object.article + "."</defaultexpression>
</verb>
<object name="deadroom3">
<inherit name="editor_object" />
</object>
</asl>
XanMag wrote:I've completed a trial and error set up but have yet to test it... I've used a combination of different flags on each lunchbox.
So... Get lunchbox...
1. Flag lunchbox as taken
2. If you try to get ice with flag taken on lunchbox, then print msg "Right idea, wrong order"
3. Use duct tape on lunchbox, swap out lunchbox for lunchbox1, set flag lunchbox as taken2
4. If you try to get ice with flag taken2 on lunchbox, then print msg "Right idea, wrong order"
5. Use knife on lunchbox1, swap out lunchbox1 for lunchbox 2, set flag on lunchbox as taken3
6. If you try to get ice with flag taken3 on lunchbox, then print msg "You fill the lunchbox with ice, set flag icy on lunchbox2
7. Use chemicals on lunchbox2, then print msg "You dump the chemicals and it gets really cold", set flag icy2 on lunchbox2
8. Use lunchbox2 as needed... If lunchbox2 has icy then print msg "Goal accomplished", else if lunchbox has icy flag print msg "You're almost there, but it's not cold enough yet", else "you are not ready to use the lunchbox yet"
It should work, right? Like I said, I haven't tested it yet and I would post the code here, but my lunchboxes are buried under 80+ items in my "item warehouse", my ice, lunchbox, knife, and tape are all in separate rooms. It's a mess.
I've never used integer attributes before but will look into it if this method gives me a major hassle.
I wish there were a way (without code) to copy-paste GUI boxes from one open version of quest to another. If that were the case, I would simply copy-paste all parts of my lunchbox problem into a test game so I could test it there and copy/find just those parts easily to paste-code here on the forum. There isn't, right?
EDIT: And I tried to copy-paste all of the parts into a test room within the game but it got all messed up because of the moving items in and out bit because of the way it is set up with all the different numbered parts, so that's not an option.