Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Pages: [1] 2  All

Author Topic: "I can't use these items together"  (Read 12992 times)

0 Members and 1 Guest are viewing this topic.

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
"I can't use these items together"
« on: May 25, 2009, 07:07:21 AM »

Can I get rid of this phrase when I try to use an inventory object on something it can't interact with?

"I can't use these objects together."

I don't see the script where this causes this to pop up. But I would like to get rid of it.  Thanks for any help.

Also I think I saw a post here by Mnemonic that you could show the number of a certain item in your inventory.  If that's possible, how would I do that?  I unfortunately can't find that post.
« Last Edit: May 25, 2009, 07:12:50 AM by Catacomber »
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: "I can't use these items together"
« Reply #1 on: May 25, 2009, 12:22:38 PM »

It's handled in game.script, in the on "LeftClick" handler.
Inventory items have .Amount and .DisplayAmount properties. Set DisplayAmont to true and Amount to some value and it will be displayed.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: "I can't use these items together"
« Reply #2 on: May 25, 2009, 09:53:32 PM »

Thank you!  I got rid of the sentence "I can't use these things together."  ;)

But am a little stuck on where to put the .Amount and .Display Amount to get a display of the number of an item in inventory.  Does it go in the Items/items description?  On the script for the item?  I tried both and nothing happened. 
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: "I can't use these items together"
« Reply #3 on: May 26, 2009, 03:15:49 PM »

You need to do something like this:

Code: WME Script
  1. var SomeItem = Game.QueryItem("item name");
  2. SomeItem.Amount = 100;
  3.  

As for where... well it depends on when you want the amount to change.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: "I can't use these items together"
« Reply #4 on: May 26, 2009, 04:10:22 PM »

Thanks.   :D    So I could, f.e., put it in dialogue where you trade one item for another and amount you have would show up and then after trade, new amount would show up?  I'll try this tonight.
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: "I can't use these items together"
« Reply #5 on: May 26, 2009, 05:21:14 PM »

Yes, exactly. However, remember you need to enable the amount display first; either by setting the DisplayAmount property to true, or directly in the items definition file (see the "money" item in WME demo for reference).
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: "I can't use these items together"
« Reply #6 on: May 26, 2009, 05:22:32 PM »

Thank you!  This solves a major problem.  :  )   ;D :D
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: "I can't use these items together"
« Reply #7 on: May 27, 2009, 01:40:07 AM »

This works perfectly now but I have just two more questions about "money" as an inventory item. 

1) The font that shows up that I have 100 money is green, the system font, and tiny.  It's hard on older eyes.  Is there any way I can change the font and save old eyes? 

2)  How can I add or subtract from that amount via script?  I don't know how to access the money.AmountDisplay from items/items. 

Thanks, Mnemonic, you have a lot of patience.
« Last Edit: May 27, 2009, 04:17:29 AM by Catacomber »
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: "I can't use these items together"
« Reply #8 on: May 27, 2009, 04:32:50 AM »

Solved how to add and subtract from the item amount:

var MoneyItem = Game.GetItem("konung");
MoneyItem.Amount = MoneyItem.Amount + 1;

[or -1 as the case may be]

But, dear Mnemonic, if you could help me save old eyes by being able to increase the size of the green system font there or substitute a different font, it would be much appreciated.  :  )   :D

« Last Edit: May 27, 2009, 06:47:30 AM by Catacomber »
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: "I can't use these items together"
« Reply #9 on: May 27, 2009, 07:15:32 AM »

Documentation is your friend. You must add a "FONT = ..." line to the definition of the item.
Working with the inventory
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: "I can't use these items together"
« Reply #10 on: May 27, 2009, 04:03:18 PM »

Ah, yes, documentation.  :  )  Thanks, Mnemonic!  Now everything looks good.   :D
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: "I can't use these items together"
« Reply #11 on: May 28, 2009, 01:32:33 AM »

Hey, Mnemonic, I'm sorry to have asked so many questions I could have solved by reading the documentation but I have been so wrapped up in trying to polish the game and you have been so kind to answer my questions, that I totally forgot about the documentation.  : )  Will try to look before I ask.  :  )
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: "I can't use these items together"
« Reply #12 on: May 31, 2009, 04:48:11 AM »

I read the documentation and just want to check something.  :  )

If I put

CURSOR_COMBINED = FALSE

on items I want to use on one another, I can't use one on the other

only if I set it to true


If I put

CURSOR_COMBINED = FALSE

on items for example that I want to use as weapons, the normal cursor disappears and it looks like I'm using the weapon on whatever it strikes---this is great because that's what I was hoping to do.

So for items that you want to use to affect something else but not combine with something else you go FALSE.

But if you want to combine one item with another, you go TRUE?

I was just trying to get the effect with a weapon that the item when you strike the target doesn't appear to the right of the normal cursor---it is the cursor.  And that happens if I go FALSE.

Just checking.  :  )

Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: "I can't use these items together"
« Reply #13 on: June 01, 2009, 03:44:04 PM »

CURSOR_COMBINED = TRUE simply means that the mouse pointer displayed is the standard one (arrow etc.) combined with the item image (as opposed to displaying the item image only).
It has nothing to do with combining items together.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: "I can't use these items together"
« Reply #14 on: June 01, 2009, 04:28:30 PM »

Thank you. Then the problem of not combining is something else---I'll recheck a few things. 
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  
Pages: [1] 2  All
 

Page created in 0.05 seconds with 24 queries.