Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(1 edit)

i wanted it for the riddle puzzle but if it gets a lot of time i think it would be easier to make a "give ITEM1 and ITEM2" command

Edit: "and" is reserved by system so im thinking about another solution. If there is something to get all things on the ground i have another way to solve this problem

(1 edit)

Ah, I can see why you might want that then. Because the easiest solution to that puzzle, at the moment, is just to DROP ALL on the ground and, providing you've got the item, then you've solved it.

There are a few ways around it, I think...

One would be to use a counter that counts how many objects you've dropped and stops you from dropping any more when the limit of 2 is reached. You'd need to pick up one of the objects (decresing the counter) to allow you to drop more. That would work fine, I think.

Another would be to use the GIVE object, to give each item you're trying in turn. Maybe this could be linked to the container system and a counter, again, to make sure you can only give him two. The "container" could be a "large wooden table" in front of the Riddle-man.

GIVE ROCK... "The man takes it off you and puts it on the table in front of him."

EXAMINE TABLE... "On the table is: A rock and a handle."

GET ROCK... "You get the rock." 

GIVE ROD... "The man takes it off you and puts it on the table in front of him."

"Yes, that's right," says the man.... etc.... etc.... 

(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.