Special action on inventory item

Started by kantor_98, Thu 25/08/2005 07:27:29

Previous topic - Next topic

kantor_98

Dear all,
Thank you again for all of you that has answer mr until now.
I want to make a special effect whem I initiate "use inventory on inventory object". More precise: I have a white paper on which is draw a hidden map. When I use the correct liquid on the paper I want to display on the screen, over everything else, a drawing with the map (I have this drawing somewhere (BMP or GIF, doesn't matter). The image must be displayed until I press a mouse button. Can everyone help me-how can I do this ? The problem is to display a certain image/animation when something is happening in the game

strazer

One way would be to create a GUI, put a button on it, set its image to the map and have the GUI close when clicked upon.

Then you would only have to display the GUI when the correct inventory item is used:

"Inventory items" pane -> Select paper inv item -> "Interaction..." -> "Use inventory on this item" -> "New action..." -> "Run script" -> "Edit script..."

Code: ags

  // script for Inventory item: Use inventory on this item

  if (player.ActiveInventory == iLiquid) { // or whatever you named the item
    gMap.Visible = true; // or whatever you named the GUI
  }


You also have to do the same for the other way around, when the paper is used on the liquid: Select liquid inv item -> "Interaction..." -> etc.

SMF spam blocked by CleanTalk