Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

I agree with Gareth on this one. If you were able to do a generic check on objects in your inventory (which you can't), then you'd be able to override the drop routine just for this room with something like (in pseudo code):

if (object in inventory) then
   if (room counter < MAX) then
      increment room counter
      drop object
      print "You place the (object) on the table."
   else
      print "There's no room left on the table."
   endif
else
   print "You don't have that."
endif

Add decrement room counter when you get an object, but this requires a generic check on whether the object is in the room (which you can't do) prior to getting the object. It is some of these really basic limitations that make Adventuron hard to use.

This is the same puzzle where I'm currently stuck (I think I'm missing an object). In this case, I think it makes more sense to GIVE OBJECT, rather than DROP OBJECT. For each of the two required objects, you can check if it's in your inventory and, if it is, give it to the riddlemaker, check if he's got both objects and give an appropriate response. However, you still run into troubles handling the generic case because of Adventuron's inability to check whether the generic object is in your inventory.

What's wrong with : if (parent_of "my_object" == current_location()) {}

If you have 100 objects in your game, you have to check 100 objects. Unless you're saying "my_object" IS a generic object, i.e. the object referred to in your input.

In Adventuron, there are already a sub-optimal of handling loops and scanning within a container (location, entity, etc).

The look_inside command, in addition to collections,  along with the while loop is a long winded way of achieving things.

As I alluded to, I suspect this would be technically work, but it's sub optimal.

A dedicated all-in-one scanning command was something I was going to work on after finishing attributes + stats.

I may move it forward if there is a demand.

The scanning construct will ultimately look a bit like this.

// Not yet working ... 
: scan (current_location()) {
  : if (is_carried(item()) { 
       // Do something here
   }
}

What I'm hoping for is something like:

: match  "throw -" {
   : if (is_carried(noun1)) {
      : drop;
      : print {("You throw the " + original_noun1() + ", but it doesn't go very far.")}
   }
   : else {
      : print "You don't have that.";
   }
}

Being able to reference noun1 and noun2 are the things that are desperately missing. Perhaps these would be noun1() and noun2() in Adventuron syntax. noun1 or noun1() is probably similar to item() in your example.

Incidentally, no need for loops with this approach.