Results 1 to 3 of 3

Thread: actions requiring an empty inventory

  1. #1
    Easter Egg
    Join Date
    Aug 2009
    Location
    Balham - gateway to the south
    Posts
    670

    Default actions requiring an empty inventory

    When I first downloaded DizzyAge I'm sure I read a comment in one of the books about object items having 'weight', but have never seen it commented on in any of the script files. In my first game I really wanted the teleport in the 'the three trials' to only operate when Daisy's inventory was empty, but could never get it to work, so changed the puzzles.

    I've recently been playing around with 'if (idx=-1)' as a way of getting a positive action if the inventory was empty when actioning a dynamic brush. It sort of works in that if the player has any items in their inventory the 'nothing happened' comment is displayed, but if the inventory is empty, the positive action only happens after the empty inventory box is displayed, which defeats the object of the puzzle.

    Is there a way to 'check the inventory contents' without using -1, or is there some variable that can check the weight of items?

  2. #2
    Hard Boiled Egg delta's Avatar
    Join Date
    Feb 2007
    Location
    North West
    Posts
    4,005

    Default

    Firstly, there is no 'weight' property or variable. If you want to create one, it would be fairly easy (just use an Object USER variable like I did in IID for the 'value' of the items)

    secondly, the function you're looking for is InventoryCount(). so code similar to
    if(InventoryCount()==0) should work.





    "Quotes from the internet may not be genuine" - Abraham Lincoln

  3. #3
    Easter Egg
    Join Date
    Aug 2009
    Location
    Balham - gateway to the south
    Posts
    670

    Default

    Oh how obvious!!!!! Thanks Jamie

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •