Removing inventory hints

This forum is meant for requesting technical support or reporting bugs.

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

Removing inventory hints

Postby Mikael » Wed Feb 04, 2009 11:00 pm

Is there any way to remove the inventory hints (the text displayed over the inventory icon while the cursor is on them)? My distributor has a problem with this when translating my older AM games. Renaming (translating) all inventory items would be too complicated.

I got this string from an old post on this forum, but can't get it to work:

For Each X in InventoryItemObject
X.tag=""
next

Thanks for any help!

Mikael, MDNA Games
Mikael
Active Member
 
Posts: 74
Joined: Wed Jan 28, 2004 1:18 am

Postby mercedes » Thu Feb 05, 2009 12:58 am

Hi there...:)

have u tried this..Put this in Global Procedures..

Code: Select all
Function HideItem(ItemName)
 For Each X in InventoryItemObject
  If X.Tag = ItemName Then
   X.Tag = ""
  End If
 Next
End Function


It might be X.Visible = False as opposed to X.TAG = ""
THen from anywhere in your project use HideItem (itemname)

Not sure if that works or not..

Peace
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Re: Removing inventory hints

Postby Lyberodoggy » Thu Feb 05, 2009 1:01 pm

Mikael wrote:Is there any way to remove the inventory hints (the text displayed over the inventory icon while the cursor is on them)? My distributor has a problem with this when translating my older AM games. Renaming (translating) all inventory items would be too complicated.

I got this string from an old post on this forum, but can't get it to work:

For Each X in InventoryItemObject
X.tag=""
next

Thanks for any help!

Mikael, MDNA Games


What problem does the code generate? seems good to me...
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby mercedes » Thu Feb 05, 2009 4:13 pm

Hey there...:D

For Each X in InventoryItemObject
X.tag=""
next

That code won't work i think cause its a function--for an object I believe......there is no end to the function..and I dont' think u can end a code with just "next" ..At least anytime i've tried to use it..I can't end it with just next ..Can you..?

I'll test the one i gave there..not sure if that will work or not..so i'll test it as soon as i can..if someone hasn't already..:D

Peace
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Mikael » Thu Feb 05, 2009 8:12 pm

The code by Lyberodoggy returns an error message "The object must contain a value" (roughly translated from Swedish)

I've tried Mercedes code, but I'm not sure about how and where to use "HideItem (itemname)" in the project (to trigger the function, right?)

Regards,

Mikael
Mikael
Active Member
 
Posts: 74
Joined: Wed Jan 28, 2004 1:18 am

Postby mercedes » Fri Feb 06, 2009 7:00 am

You can use the HideItem (ItemName) from anywhere in your project. In the frame's advanced...

Please let me know if this works..see if we can't find something else ...:)

Peace..

*Edit* That code doesn't seem to be working on this end.:? I can't get rid of the hover tooltip that says the item's name in the inventory..Only the item i can get rid of or rename it/Can't get rid of the actual tag/label itself......Hopefully maybe we can find another solution..:(..

On another note..i did find another neat solution..If you want to hide the item before in the inventory..So if its a key in the inventory and you wish to hide the key after clicking say a hammer..Put this in the Global Procedures..
Code: Select all
Sub HideItem(ItemName)
 For Each X in InventoryItemObject
X.TAG = ItemName
If X.TAG = ItemName Then
   X.visible = False
  End If
 Next
End Sub


Code: Select all
HideItem key
THen put this in the hotspots Advanced when user clicks the hotspot .the item before dissapears..Also good for if the user is clicking the same hotspot.

I know this doens't solve this post..but thought I would add it in case it comes i useful someday..


Peace..
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Leo » Sat Feb 07, 2009 1:39 am

I tried the next modification of the procedure in Mikael's game:

Code: Select all
Function HideItem(ItemName)
 For Each X in InventoryItemObject
  If X.Tag = ItemName Then
  MsgBox  X.Tag
  X.Tag = "Object"
  MsgBox X.Tag
  End If
 Next
End Function


The value of the X.Tag property changes to "Object". In the next frame I checked presence of object "Object" in the inventory with the procedure HasItem, as in example #30. Here it is. But tool-tip of the object doesn't change. I think that tool-tip displays not the X.Tag property. :(

Sorry for my english. :oops:
User avatar
Leo
Junior Member
 
Posts: 7
Joined: Sat Feb 07, 2009 1:33 am
Location: Moscow, Russia

Postby mercedes » Sat Feb 07, 2009 3:47 am

HI there...Welcome to the forums..Leo.:D

I agree there..I think the X.TAG property is the actual "hotspot/tag" so to speak of the inventory "item"...not the tool tip..that hovers over it...:(..Not sure if the tooltip can be taken away...not from our end..Hopefully i'm wrong..

Peace
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Lyberodoggy » Sat Feb 07, 2009 11:52 am

X.tag is the name with wich the item is recognized.
To hide the tool tip, just use this:
Code: Select all
Sub HideItem(ItemName)
 For Each X in InventoryItemObject
  If X.Tag = ItemName Then
  X.ToolTipText=""
  end if
next
End Sub


To hide every tool tip use this code:

Code: Select all
Sub HideItems
 For Each X in InventoryItemObject
   X.ToolTipText=""
 next
End Sub


To hide the item itself:

Code: Select all
Sub HideItem(ItemName)
 For Each X in InventoryItemObject
  If X.Tag = ItemName Then
  X.Visible=false
  end if
next
End Sub
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby Leo » Sat Feb 07, 2009 12:06 pm

Lyberodoggy

BINGO!!! It works!!!! Thank You very much!!! Now I can change or eliminate the tool-tips. Thanks again!!!
User avatar
Leo
Junior Member
 
Posts: 7
Joined: Sat Feb 07, 2009 1:33 am
Location: Moscow, Russia

Postby mercedes » Sat Feb 07, 2009 12:11 pm

I knew tooltip was involved in the code!..I was thinking that yesterday..not only X.tag....yayy..I knew u would figure it out Kid..;) I had tried the tooltip..but i was doing Tool.Tip..which isn't right..Way to go Kiddo..!~:D

Peace
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Lyberodoggy » Sat Feb 07, 2009 12:25 pm

Yeah I had to meditate to find the right method but anyway :lol:
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby Leo » Sat Feb 07, 2009 10:27 pm

One more localization question.
When I change location of my computer to Germany, all dialogs in AM switch to German. All except buttons "Yes" and "No" in dialog boxes like Quit game or Replace Saved Game. Could it be fixed?
Thank You!

Image
User avatar
Leo
Junior Member
 
Posts: 7
Joined: Sat Feb 07, 2009 1:33 am
Location: Moscow, Russia

Postby Lyberodoggy » Sat Feb 07, 2009 10:41 pm

From main program go to Preferences-> restore default settings
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby Leo » Sat Feb 07, 2009 11:48 pm

Lyberodoggy

No, that doesn't work. "Yes" and "No" the only buttons, that didn't change. All other buttons are German.

I found it. That's because system is English and system dialogs don't switch to German when switching country to Germany.
User avatar
Leo
Junior Member
 
Posts: 7
Joined: Sat Feb 07, 2009 1:33 am
Location: Moscow, Russia


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests