Author Topic: Last question of the nigth (Current item thingy)  (Read 1679 times)  Share 

HillBilly

  • rockin' on them killbillies
  • HillBilly worked on a game that was nominated for an AGS Award!
I cant fix it so the thing next to the inventory button shows the last item you used... Does anybody know this?  :)

Thanks,
-Adrian

Scorpiorus

  • 100101101010b
Re:Last question of the nigth (Current item thingy)
« Reply #1 on: 13 Jun 2003, 20:05 »
Quote from AGS manual:
You can also have the current inventory item displayed in its own button on the icon bar by creating a button on the GUI and setting its text to (INV) which stretches the item picture to the button size, or (INVNS) which draws the inventory item picture straight onto the button with no resizing. Finally, (INVSHR) , probably the best option, will draw it at actual size if it will fit, or shrink it if not.



-Cheers

HillBilly

  • rockin' on them killbillies
  • HillBilly worked on a game that was nominated for an AGS Award!
Re:Last question of the nigth (Current item thingy)
« Reply #2 on: 13 Jun 2003, 21:30 »
Yeah, i've tried that... But the only thing i got then was some text at the top, and that's it.

Scorpiorus

  • 100101101010b
Re:Last question of the nigth (Current item thingy)
« Reply #3 on: 13 Jun 2003, 21:41 »
hehe, try to guess the problem... You set it as INV, right? But it has to be (INV) See these brackets.. ;)

One day I had written it like you and even wanted to report a bug in the forums. Fortunately I had figured it out before posting... ;D

-Cheers
« Last Edit: 13 Jun 2003, 21:42 by Scorpiorus »

HillBilly

  • rockin' on them killbillies
  • HillBilly worked on a game that was nominated for an AGS Award!
Re:Last question of the nigth (Current item thingy)
« Reply #4 on: 14 Jun 2003, 09:38 »
Okay, thanks. :)

Now there are only one problem; Either i get the inventory streched so incredible much, or the item will go outiside the box.  :-\

Rui 'Trovatore' Pires

  • Lunge da lei per me non v'ha diletto!
    • I can help with AGS tutoring
    •  
    • I can help with play testing
    •  
    • I can help with proof reading
    •  
    • I can help with scripting
    •  
    • I can help with story design
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
Re:Last question of the nigth (Current item thingy)
« Reply #5 on: 14 Jun 2003, 13:14 »
The most obvious solution would be to use (INV) instead of (INVSHR) and the re-import you inventory graphic, with a considerable transparent area around them, so as to inscrease the graphic's size without stretching it.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Scorpiorus

  • 100101101010b
Re:Last question of the nigth (Current item thingy)
« Reply #6 on: 14 Jun 2003, 13:14 »
Well, as manual states, the best option is (INVSHR) which shrinks the image only if it doesn't fit.

What are the sizes of button and item sprite respectively?

Also if you set it to shrink make sure an image sprite is the same color depth as the game itself. Because I had problems shrinking/stretching a 256-colored sprite in HiColor game.

-Cheers

HillBilly

  • rockin' on them killbillies
  • HillBilly worked on a game that was nominated for an AGS Award!
Re:Last question of the nigth (Current item thingy)
« Reply #7 on: 14 Jun 2003, 13:18 »
32 x 27 is the button size, and every graphics is set to high...

Scorpiorus

  • 100101101010b
Re:Last question of the nigth (Current item thingy)
« Reply #8 on: 14 Jun 2003, 14:15 »
The sprite size is also very important. What is the actual pixel size, btw?

And what is the game resolution?

redruM proposed a very good idea. Item sprite shouldn't have too much transparent area because stretching/shrinking is applied to the whole sprite, not only to the image visible area.

HillBilly

  • rockin' on them killbillies
  • HillBilly worked on a game that was nominated for an AGS Award!
Re:Last question of the nigth (Current item thingy)
« Reply #9 on: 15 Jun 2003, 08:24 »
Its diffrent size on every inventory item...
The resulution is 640 x 400 if that's what you meant.

I dont really wanna make my graphic with a area around themself.
I like the way they look now...

Rui 'Trovatore' Pires

  • Lunge da lei per me non v'ha diletto!
    • I can help with AGS tutoring
    •  
    • I can help with play testing
    •  
    • I can help with proof reading
    •  
    • I can help with scripting
    •  
    • I can help with story design
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
Re:Last question of the nigth (Current item thingy)
« Reply #10 on: 15 Jun 2003, 08:28 »
I dont really wanna make my graphic with a area around themself.
I like the way they look now...

You do realize that re-importing them with that transparent area around wouldn't change the actual image, right? I mean, your key would still look like your key.
And anyway, you don't have to make new graphics, just re-import them. If you deleted the original .bmp or .pcx or whatever files (which I don't reccomend, I myself always keep everything) just export your inventory's sprite slot and then add some transparent area around it.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Scorpiorus

  • 100101101010b
Re:Last question of the nigth (Current item thingy)
« Reply #11 on: 15 Jun 2003, 12:57 »
Make a little test:

1. Draw a sprite with the size: 50x50 (draw a simple primitive like rectangle or circle, draw it as large as possible but make sure it fits in 50x50)

2. Open sprite manager, import and grab entire sprite.
Note: Import for 640x400 resolution has to be ticked!

3. Now make new inventory item; set the imported sprite.

4. Set button as (INVSHR).

See how it looks...

-Cheers

HillBilly

  • rockin' on them killbillies
  • HillBilly worked on a game that was nominated for an AGS Award!
Re:Last question of the nigth (Current item thingy)
« Reply #12 on: 16 Jun 2003, 15:59 »
Yeah i tried that, and it worked better.  :)
But does that mean that all my inventory must be 50 x 50 or something about as small to fit?

Crap.

i need to make 3 items smaller then. Wich will look very stupid smaller.  :P
« Last Edit: 16 Jun 2003, 16:09 by HillBilly »