Specific Item Drop and moving from inventory

XanMag
07 May 2014, 15:56
Ok... I'm almost done with my first game and I think it will be AWESOME!! *fingers crossed*

But, I'm having one final issue I'm not sure how to approach.

The player has to drop a specific item from a tree top and hit the correct target below (spot 1, spot 2, spot 3, etc) on a grid far below. I have commands for dropping the correct item on the correct target... no problem.

How can I create a command for dropping an incorrect item that results in that specific item falling "out of the current room" to the ground below? I do not want to simply respond with a statement that says something like "You cannot drop that object here." I want to move the incorrect object from their inventory. I wish to punish my gamers by figuring this out by trial and error!! :evil:

I could create 20+ commands for every possible item in the inventory that read something like 'drop lighter on spot 10' and 'drop lasso on spot 12' followed by a move item option for each command, but I am sure there is a much easier way to script this in the game, right?

I'm trying the drop #text# on #text# if the player is in that specific room (top of tree), but I'm not sure how to move the specifically dropped item to the room below.

Thanks for any help you can give!!

jaynabonne
07 May 2014, 16:04
First, I'd use:

drop #object# on #text#


as this will force the first item to be an actual object, and you'll just be able to use it straight away as "object" in the script. To move the object to the room below, just do:

object.parent = RoomBelow