![Smile :)](./images/smilies/icon_smile.gif)
1 Create an inventory bar:
Let's say you're using a 1024 x 768 resolution (or whatever). We make a bar, say 1024 by 100. A transparent PNG file in whatever pain program you use (I use paintshop pro)
Next fill this rectangle with any colour or picture etc. Get the look of your bar.
Be sure to make a selection for say Health? if you want that... Just a box which is erased to become transparent. So you'l have a bar with some alpha boxes in it, all see through and lovely. This is why we save to PNG at first.
2. Get Gimp (2.0) for free off it's official page (google it)
Using Gimp, import your PNG bra and then go to File>Export> Then rename the top title from "inventorybar.png" (whatever it's called) to inventorybar.gif and then choose export to GIF from the drop down menu to the lower right of the Gimp export screen. If you did this correctly, a box should appear asking if you want to add a gif signature... uncheck or leave the box checked, your choice. Then export. Bingo, there is your bar.. with the transparent layer in as a gif! It's automatically saved so now close gimp.
3. Open AM And create a blank frame (call it inventory frame or whatever) and create a hotspot. Click hotspot picture as your inventory.gif. Do not resize.
4. Position the inventory bar at 0left 668top coordinates by dragging it about and observing the coordinates in the box which appears in AM. Once in position, hover your mouse over the empty transparent box you left in there and log the upper left coordinates (on a text pad or in your head
![Smile :)](./images/smilies/icon_smile.gif)
Exit and create a new frame (call it game frame for now).
5. The gameframe will be your stencil for each frame. On here, Right click to add text box (just type 1 or something into it). Now drag that box to the coordinates on the frame which you logged in your head. Get it now? The variable value will be shown in the blank space, though you cannot see that yet... hold on!
6. Go to frame properties.
Type into advanced VBS
Text(1).Caption=""+CStr(Health) < keep this code handy. You will need to implement it into every action which affects the health value.
7. Exit an go to Runtime frame merging. Select the gameframe and assign the inventorybar frame to it. And there you go!
Extras:
Now when you go back to the inventory frame you can add other ghotspots... let's say a gif which says "look" "talkto" etc. Make each one switch between a variable of the same name. OR Use two jpeg images or gifs or what have you... just 2 images. One for active and one for inactive. Have the one on the bottom "only visible when "lookat = 0" and the upper when "lookat = 1" Lay them directly over the top of each other. Now awesome is this now then? Go back to the gameframe...
Example of it in action.
Draw a hotspot on the game frame and load a graphic of any sorts. Go to the VBS section and type
Health = Health - 10
Text(1).Caption=""+CStr(Health) < This code updates the value on the screen
Then go to frame props and type Health = 100
You have just given your health 100 points and asked it to display them in real time.
Test frame... If all went well your inventory bar should be there and you should have 100 points in it... then when you click the hotspot picture in the middle, 10 points should be taken off this time ...
There you go. A reeeeaaaal simple way of doing this. You cannot use text objects with constant updates from a merged frame, that's why you need the transparent bits in the bar to display your value from the game frame instead. It took me a while to come to terms with this. Mew. Consider this dinosaur bones... gte digging yerself now you know how. Keyguard can be implemented for better effects and stuff, but this is in cae you don't want plugins used.
"How would I do it for an ipad or PSP?"
Well there's a way... through variables...
Create 5 variables "HP1 HP 2 HP3 and so on. Then create 5 corresponding hotspots on the game frame you have. Make each one only available if it's variable is at 1.
Create a blank frame with one hotspot. make it go to your game frame. Go to the variables and make it change HP 1-5 to 1 on the way. This will display your 5 health points.
Now draw a hotspot on the gameframe... make it an enemy or something. In it's hotspot properties make it so it takes HP 1 - 3 to 0. Select hide and diable when done.
Duplicate the hotspot.
Go to its properties and make it so it turns HP2 and 1 to 0. Select hide and disable.
Just a though as I'm using windows versions.
But this method should allow for you to have "HP points" displayed and taken away or added (through whatever inventive method you decide). I wrote this as I know PSP games and IPad ones don't allow for VBscript to be added to te advanced properties. Hope it's been helpful to someone.
Taterz folks!
![Very Happy :D](./images/smilies/icon_biggrin.gif)
![Very Happy :D](./images/smilies/icon_biggrin.gif)
![Very Happy :D](./images/smilies/icon_biggrin.gif)