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 7952 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
Re: "I can't use these items together"
« Reply #15 on: June 02, 2009, 06:02:52 AM »

For some reason if I set the combined cursor to false for one inventory object that can be combined with another inventory object to get a new inventory object, the inventory objects that are supposed to work on each other don't. 

If it's an inventory object working on an in-game object it's ok, everything works fine-- but not an inventory object working on another inventory object.  This is not a big deal, I'll work around it but I'd like to know why it's happening like this.  : )

That is, I'd like to know if I made a mistake somewhere or this is the way it's supposed to be.

My code on the objects looks fine and it's the same code that was there before I changed the combined cursor to false so I could just have the pic of the object and not the cursor with the object.
« Last Edit: June 02, 2009, 06:04:32 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: 5679
    • View Profile
    • Dead:Code Site
Re: "I can't use these items together"
« Reply #16 on: June 03, 2009, 02:30:41 PM »

Using an inventory item on another item should definitely work. But it's hard to tell what you're doing wrong. It's handled in game.script in the LeftClick handler.
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 #17 on: June 03, 2009, 03:09:59 PM »

Thanks, I'll post the scripts tonight.  I think it's because the image (cursors) of both items used on each other would disappear before the new image (cursor) item is generated but not sure.

For example---and again I'll post the code later--am not at my computer:

You have a bar and a crow.  You can use the crow on the bar to make a crowbar.  Or use the bar on the crow to make a crowbar.  The pictures of the items are their cursor--not the ingame cursor.  When they should combine and both bar picture and crow picture go away to be replaced by picture of crowbar--nothing happens if and only if CURSOR_COMBINED = FALSE.  If CURSOR-COMBINED = TRUE, everything works as normal.
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 #18 on: June 04, 2009, 01:04:50 AM »

Here's the code:

Code on gold bar

Code: WME Script
  1. #include "scripts\base.inc"
  2.  
  3. on "LeftClick"
  4. {
  5.     Game.SelectedItem = "bar";
  6. }
  7.  
  8.  
  9. on "crow"
  10. {   Game.TakeItem("crowbar");
  11.      Game.DeleteItem("crow");
  12.      Game.DeleteItem("bar");    
  13.         }
  14.  

Code on the crow

Code: WME Script
  1.  
  2. #include "scripts\base.inc"
  3.  
  4. on "LeftClick"
  5. {
  6.     Game.SelectedItem = "crow";
  7. }
  8.  
  9. on "bar"
  10. {   Game.TakeItem("crowbar");
  11.      Game.DeleteItem("bar");   
  12.      Game.DeleteItem("crow");
  13.  
  14. }
  15.  

Code on the crowbar

Code: WME Script
  1. #include "scripts\base.inc"
  2.  
  3. on "LeftClick"
  4. {
  5.     Game.SelectedItem = "crowbar";
  6. }
  7.  
  8.  


Items:
Code: WME Script
  1. ITEM
  2. {
  3.    CURSOR_COMBINED = FALSE;
  4.    CAPTION = "Crow"
  5.    NAME = "crow"
  6.    IMAGE = "scenes\House_Arrest2\Crow2.png"
  7.    CURSOR = "scenes\House_Arrest2\Crow2.png"
  8.    CURSOR_HOVER = "scenes\House_Arrest2\Crow2.png"
  9.    SCRIPT = "items\crow.script"
  10. }
  11.  

Code: WME Script
  1. ITEM
  2. {
  3.        CURSOR_COMBINED = FALSE;
  4.            CAPTION = "Bar"
  5.            NAME = "bar"
  6.            SPRITE = "scenes\House_Arrest2\Bar2.png"
  7.            CURSOR = "scenes\House_Arrest2\Bar2.png"
  8.            CURSOR_HOVER = "scenes\House_Arrest2\Bar2.png"
  9.            SCRIPT = "items\bar.script"
  10. }
  11.  
  12.  

Code: WME Script
  1. ITEM
  2. {
  3.        CURSOR_COMBINED = FALSE;
  4.            CAPTION = "Crowbar"
  5.            NAME = "crowbar"
  6.            SPRITE = "scenes\House_Arrest2\crowbar.png"
  7.            CURSOR = "scenes\House_Arrest2\crowbar.png"
  8.            CURSOR_HOVER = "scenes\House_Arrest2\crowbar.png"
  9.            SCRIPT = "items\crowbar.script"
  10. }
  11.  
  12.  
« Last Edit: June 04, 2009, 03:52:30 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 #19 on: July 04, 2009, 05:26:24 AM »

I still have a problem here and it's really annoying a betatester who would not like the cursor to be visible with the object when you're using an inventory object on an object in the scene.  I've done this successfully with a different object in a different scenario in the scene so am not sure what's wrong here.  But it happens in other places, f.e. if I'm using an inventory object on another--I can't use combined equals false.  I'd really like to sort this out.

I have a little in game puzzle.  You apply a gem to an object in the scene.  This is the code for the object in the scene:

Code: WME Script
  1.  
  2. #include "scripts\base.inc"
  3.  
  4. global R;
  5. global G;
  6. global B;
  7. var EntGgem=Scene.GetNode("Ggem");
  8.  
  9. on "T2"
  10.  
  11. {
  12. if((R==1) && (G==null) && (B==null))
  13. {var x = hud.GetControl("loc")
  14. EntGgem.SetSprite("scenes\House_Arrest2\T2.png");
  15. x.Text = "Bling.";
  16. Sleep(350);
  17. G=1;
  18. Game.DropItem("T2");
  19. }
  20. else
  21. {if(R==null)
  22. {
  23. x.Text = "Oops.";
  24. Sleep(350);
  25. R=null;
  26. G=null;
  27. B=null;
  28. Game.TakeItem("T1");
  29. Game.TakeItem("T3");
  30. }
  31. }
  32. }
  33.  

This is the code for the item that interacts with that object in the scene.

Code: WME Script
  1.  
  2. #include "scripts\base.inc"
  3.  
  4. on "LeftClick"
  5. {
  6.     Game.SelectedItem = "T2";
  7. }
  8.  
  9.  

This is the code for the item T2:

Code: WME Script
  1.  
  2. ITEM
  3. {
  4.        CURSOR_COMBINED = TRUE
  5.            CAPTION = "Green Gem"
  6.            NAME = "T2"
  7.            SPRITE = "scenes\House_Arrest2\T2.png"
  8.            CURSOR = "scenes\House_Arrest2\T2h.png"
  9.            CURSOR_HOVER = "scenes\House_Arrest2\T2h.png"
  10.            SCRIPT = "items\T2.script"
  11. }
  12.  
  13.  

If I change the CURSOR COMBINED to FALSE, I cannot place the T2 item on the object in the scene where it's supposed to go but it would be more elegant to be able to do that.  What am I doing wrong?

Help!  Thanks as always. 
« Last Edit: July 04, 2009, 05:33:27 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: 5679
    • View Profile
    • Dead:Code Site
Re: "I can't use these items together"
« Reply #20 on: July 04, 2009, 07:58:07 AM »

Sorry, but I still don't get what your problem is. CURSOR_COMBINED really only affects how the mouse pointer is painted. It does NOT affect function. You'd have to prove otherwise to me by providing some demo :)

Remember the hot spot placement for the sprite used for mouse pointer is important. You will want to move the hot spot to the point where the player expects the pointer to interact. If your pointer is an arrow, the hot spot should be at the point of the arrow. If your pointer is an hourglass, the shot spot should be in the middle of the hourglass, etc.
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 #21 on: July 05, 2009, 08:25:44 AM »

My cursor is an embellished circle and the hotspot is in the middle.

But I have a hover cursor--hotspot also in middle.

I am going to have a demo in the next day or so.  I am going to send that demo to BigFish Games.
I am sure they will come back with comments but I would like to anticipate and satisfy all their comments. [If we cannot satisfy all their comments we will just have to find a different market, but trying.  : )]

If it is OK with you, I would like to pm it to you.  If you have a chance to look at it, it would be very helpful.  Thanks, Mnemonic. 

Am still struggling with this.  I understand totally what you say, but using an object on another object in the scene is still random success.  It seems to work fine if the scene item is not a sprite area but is a region area.

Have conquered a number of things but this is still a brick wall for me.  : )  Trying!
« Last Edit: July 05, 2009, 09:00:05 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 #22 on: July 06, 2009, 05:39:11 AM »

Still same problem.
« Last Edit: August 26, 2009, 09:55:22 PM 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: 5679
    • View Profile
    • Dead:Code Site
Re: "I can't use these items together"
« Reply #23 on: July 07, 2009, 09:29:52 AM »

Cool, I'll look into it.
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 #24 on: July 07, 2009, 02:39:59 PM »

Thank you, Mnemonic!!!!  The doorknob works exactly as it should -- you don't see any cursor attached.  However, the colored triangles drag the cursor.  Am scrutinizing the script to see why there's a difference but just not seeing it.  The doorknob hovers over and interacts with a region entity. The colored triangles hover over a sprite entity but I changed that to region and still no good.  Thanks.  If you need any script please let me know.
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  
Pages: 1 [2]  All
 

Page created in 0.308 seconds with 24 queries.