Container code?

insidethecircle
16 Sept 2009, 11:09
am getting on great with Quest but run into a little problem and was hoping some of the 'techo wizards' might know the solution.

what is the correct code for finding out if an object is inside a container?

mouldybread= bread object
grill= grill object
grillheat= on/off heat flag
cafe= location
dust= dust

if property <mouldybread; #grill:container#> and flag <grillheat> then {
msg <|s00The grill's heat turns the mouldy bread into dust. >
remove <mouldybread>
hide <mouldybread>
move <dust; Cafe>
add <dust; grill> }



thanks

Alex
16 Sept 2009, 11:55
You can check the parent property of the object. To see if a purse is inside a bag, you can use


if (#purse:parent# = bag) then msg <The purse is inside the bag>

insidethecircle
17 Sept 2009, 15:27
yay!
thanks for the code and thanks for a great program!