Step 12 : (Fill the Safe)

The safe should contain something, otherwise it would be useless. Create a new object called "money" and use the image "money_object" for it. Put this object into the room and place it over the safe so it looks right when the safe is opened. When the safe is closed the money may not be visible so set the current state to "0" in the roomwindow to deactivate the object for now.
To make it visible you have to add the instruction "setobj (money ; 1)" into the cutscene "result", right there where the you open the safe.

Create a new item called "money" and use the image "money_item".
You should know how to pick up the money and add it to your inventory from the first tutorial! So, good luck ;)

The script for the item "money" now gets a "PRESET for Items" (Click on the "Add" Button in the script window and choose "PRESETS" and "Item") just as the item "keycard" has. Don't forget to add an "on(look)" event.



Step 13 : (Give Herbert the money)

So, the script for the "money" item should contain the lines "on (give)" and "givelink()". This is the first step for giving away an item. Herbert has now to receive it.

Add to Herberts Script :

  on (givelink)
    {
    lookto (herbert ; self)

    if_givelink (money)
      {
      pickup (self)
      pickup (herbert)

      delitem (self ; givelink)
      additem (herbert ; givelink)
      playsound (pickup)
      }

    ifnot_givelink (money)
      speech (herbert ; Thanks, but i don't need this!)
    }

"if_givelink" queries for the item that has called "givelink()" before. If it was "money" then the item moves from Horst's to Herbert's Inventory. This is realized by using the instructions "additem" and "delitem" with the value "givelink", so the item that has started the givelink-event will be moved. (i am sorry if my english is so bad that you couldn't understand the last part :( )

Every "if" instruction can be used as "ifnot". So, if we try to give Herbert something else he will say that he doesn't need it.

Now Herbert has his money, but he is still running around. Lets create another cutscene. After the instruction "playsound (pickup)" enter this : "cutscene (herbertgoes)".

Next