166
Technical forum / Re: Inventory item highlight
« on: March 25, 2011, 04:25:56 PM »
Thanks Mnemonic. I have already achieved this using MouseEntry and MouseLeave events. We are building our game having in mind that we do not want those annoying "I cannot do that" or "You cannot use these things together" words from the game, which our team has learned to despise in even many great adventure games. The "different hover image" I have mentioned is to show to the players that using the item is not possible, in order to prevent them from doing the good old "try all items with all hotspots", which in my opinion reduces some of the atmosphere and realism of the game.
If anyone is interested in such approach check out the code below:
You need to have an extra icon for the item which is the "cannot make action" item. I named it the same as the normal icon with extra extension _d, similar to _h for the hover icon. It is simple but the only drawback is that you have to add this code to every actor and hotspot in the game.
If anyone is interested in such approach check out the code below:
Code: WME Script
- on "MouseEntry"
- {
- }
- }
- on "MouseLeave"
- {
- if(item != null){
- }
- }
You need to have an extra icon for the item which is the "cannot make action" item. I named it the same as the normal icon with extra extension _d, similar to _h for the hover icon. It is simple but the only drawback is that you have to add this code to every actor and hotspot in the game.